Interface Logic

All Superinterfaces:
Signal
All Known Implementing Classes:
And, LogicGate, LogicNumber, MultipleAnd, Nand, Not, Or, Xor

public interface Logic extends Signal
Extension of signals to Logic signals The signal may be TRUE or FALSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Logic
     
    static final Logic
     

    Fields inherited from interface ch.epfl.cs107.play.signal.Signal

    EPSILON
  • Method Summary

    Modifier and Type
    Method
    Description
    default float
     
    default float
    getIntensity(float t)
    Intensity getter for given time
    boolean
     
    boolean
     

    Methods inherited from interface ch.epfl.cs107.play.signal.Signal

    is
  • Field Details

    • TRUE

      static final Logic TRUE
    • FALSE

      static final Logic FALSE
  • Method Details

    • isOn

      boolean isOn()
      Returns:
      (boolean): true if the signal is considered as on
    • isOff

      boolean isOff()
      Returns:
      (boolean): true if the signal is considered as off
    • getIntensity

      default float getIntensity()
      Returns:
      (float) : the signal intensity, usually 0.0 or 1.0
    • getIntensity

      default float getIntensity(float t)
      Description copied from interface: Signal
      Intensity getter for given time
      Specified by:
      getIntensity in interface Signal
      Parameters:
      t - (float): the time at which we want the intensity
      Returns:
      (float): signal intensity, usually between 0.0 and 1.0