- 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 Summary
Constructors Modifier Constructor Description protected
Input()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
attach(CodeContext<?> context)
Input
clearLinks()
Clear all Linkables from this Input.Linkable.Double
doubles()
Return aLinkable.Double
for reacting on inputs.protected void
updateLinks(double value)
protected void
updateLinks(Value value)
Linkable.Double
values()
Deprecated, for removal: This API element is subject to removal in a future version.<T extends Value>
Linkable<T>valuesAs(Class<T> type)
Return aLinkable
of inputs as the provided Value subclass.<T> Linkable<T>
valuesAs(Function<Value,T> converter)
Return aLinkable
of inputs transformed by the provided converter from Value to the required type.
-
-
-
Method Detail
-
attach
protected void attach(CodeContext<?> context)
-
values
@Deprecated(forRemoval=true) public Linkable.Double values()
Deprecated, for removal: This API element is subject to removal in a future version.Return aLinkable.Double
for reacting on inputs. None numeric inputs will be ignored.- Returns:
- Linkable.Double of input
-
doubles
public Linkable.Double doubles()
Return aLinkable.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 aLinkable
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 aLinkable
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
-
-
-