Class BDebounce.Both

java.lang.Object
com.stuypulse.stuylib.streams.booleans.filters.BDebounce.Both
All Implemented Interfaces:
BDebounce, BFilter
Enclosing interface:
BDebounce

public static class BDebounce.Both extends Object implements BDebounce
A General Debounce Filter.

The input BStream must remain the constant for debounceTime before it changes the value it returns

  • Constructor Details

    • Both

      public Both(Number debounceTime)
      Parameters:
      debounceTime - amount of time the BStream must remain constant before changing
  • Method Details

    • get

      public boolean get(boolean next)
      Description copied from interface: BFilter
      Get next value in Filter based on the next value given
      Specified by:
      get in interface BFilter
      Parameters:
      next - next input value in the stream
      Returns:
      the output value of the filter