Class Input

java.lang.Object
org.praxislive.code.userapi.Input

public abstract class Input extends Object
A field type providing a control input port. Use with @In or @AuxIn.
  • Constructor Details

    • Input

      protected Input()
  • Method Details

    • attach

      protected void attach(CodeContext<?> context)
    • doubles

      public Linkable.Double doubles()
      Return a Linkable.Double for reacting on inputs. None numeric inputs will be ignored.
      Returns:
      Linkable.Double of input
    • valuesAs

      public <T> Linkable<T> valuesAs(Function<Value,T> converter)
      Return a Linkable of inputs transformed by the provided converter from Value to the required type.
      Type Parameters:
      T -
      Parameters:
      converter - convert Value to required type
      Returns:
      Linkable of input
    • valuesAs

      public <T extends Value> Linkable<T> valuesAs(Class<T> type)
      Return a Linkable of inputs as the provided Value subclass. If the input Value cannot be coerced to the requested type it will be ignored.
      Type Parameters:
      T -
      Parameters:
      type - required Value subclass
      Returns:
      Linkable of input
    • clearLinks

      public Input clearLinks()
      Clear all Linkables from this Input. All previously created Linkables will cease to receive input values.
      Returns:
      this
    • updateLinks

      protected void updateLinks(double value)
      Parameters:
      value -
    • updateLinks

      protected void updateLinks(Value value)
      Parameters:
      value -