- java.lang.Object
-
- org.praxislive.core.Value
-
- org.praxislive.core.ArgumentInfo
-
public final class ArgumentInfo extends Value
Info object used to define the valid input and output arguments of a Control. As well as giving the type of the argument, an ArgumentInfo can have an optional set of properties. This might be used for defining the "minimum" and "maximum" values of a PNumber argument, for example.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.praxislive.core.Value
Value.Type<T extends Value>
-
-
Field Summary
Fields Modifier and Type Field Description static StringKEY_ALLOW_EMPTYstatic StringKEY_ALLOWED_VALUESstatic StringKEY_EMPTY_IS_DEFAULTstatic StringKEY_MIME_TYPEstatic StringKEY_OPTIONALstatic StringKEY_SUGGESTED_VALUESstatic StringKEY_TEMPLATEstatic StringKEY_VARARGS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Value.Type<? extends Value>argumentType()booleanequals(Object obj)Values must override the default equals method.static Optional<ArgumentInfo>from(Value arg)inthashCode()Values must override the default hashcode method.static ArgumentInfoof(Class<? extends Value> argClass)Create an ArgumentInfo from the Value class and optional PMap of additional properties.static ArgumentInfoof(Class<? extends Value> argClass, PMap properties)Create an ArgumentInfo from the Value class and optional PMap of additional properties.static ArgumentInfoparse(String string)PMapproperties()StringtoString()Values must override the default method to return a string representation that is immutable.-
Methods inherited from class org.praxislive.core.Value
equivalent, info, isEmpty, type
-
-
-
-
Field Detail
-
KEY_ALLOWED_VALUES
public static final String KEY_ALLOWED_VALUES
- See Also:
- Constant Field Values
-
KEY_SUGGESTED_VALUES
public static final String KEY_SUGGESTED_VALUES
- See Also:
- Constant Field Values
-
KEY_ALLOW_EMPTY
public static final String KEY_ALLOW_EMPTY
- See Also:
- Constant Field Values
-
KEY_EMPTY_IS_DEFAULT
public static final String KEY_EMPTY_IS_DEFAULT
- See Also:
- Constant Field Values
-
KEY_TEMPLATE
public static final String KEY_TEMPLATE
- See Also:
- Constant Field Values
-
KEY_MIME_TYPE
public static final String KEY_MIME_TYPE
- See Also:
- Constant Field Values
-
KEY_OPTIONAL
public static final String KEY_OPTIONAL
- See Also:
- Constant Field Values
-
KEY_VARARGS
public static final String KEY_VARARGS
- See Also:
- Constant Field Values
-
-
Method Detail
-
argumentType
public Value.Type<? extends Value> argumentType()
-
properties
public PMap properties()
- Returns:
- PMap properties
-
toString
public String toString()
Description copied from class:ValueValues must override the default method to return a string representation that is immutable.
-
equals
public boolean equals(Object obj)
Description copied from class:ValueValues must override the default equals method. This method should only returntrueif the supplied Object is of the same type as the implementing Value. Values of an unknown type should be coerced before calling this method. This method does not have to guarantee thatthis.equals(that) == this.toString().equals(that.toString())
-
hashCode
public int hashCode()
Description copied from class:ValueValues must override the default hashcode method.
-
of
public static ArgumentInfo of(Class<? extends Value> argClass)
Create an ArgumentInfo from the Value class and optional PMap of additional properties.- Parameters:
argClass-- Returns:
- ArgumentInfo
-
of
public static ArgumentInfo of(Class<? extends Value> argClass, PMap properties)
Create an ArgumentInfo from the Value class and optional PMap of additional properties.- Parameters:
argClass-properties-- Returns:
- ArgumentInfo
-
from
public static Optional<ArgumentInfo> from(Value arg)
-
parse
public static ArgumentInfo parse(String string) throws ValueFormatException
- Throws:
ValueFormatException
-
-