Package com.aspectran.core.util.apon
Class ParameterValue
- java.lang.Object
-
- com.aspectran.core.util.apon.ParameterValue
-
-
Constructor Summary
Constructors Modifier Constructor Description ParameterValue(java.lang.String name, ValueType valueType)ParameterValue(java.lang.String name, ValueType valueType, boolean array)ParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket)protectedParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket, boolean valueTypeFixed)ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass)ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array)ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket)protectedParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket, boolean valueTypeFixed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidarraylize()Change parameter type to array type.voidclearValue()Clears the parameter value.intgetArraySize()Returns the size of the array if the value is an array.ParametersgetContainer()Returns theParametersthat contains theParameter.java.lang.StringgetName()Returns the parameter name.java.lang.StringgetQualifiedName()Returns the fully qualified parameter name.java.lang.ObjectgetValue()Returns a value as anObject.java.lang.BooleangetValueAsBoolean()Returns a value as aBoolean.java.lang.Boolean[]getValueAsBooleanArray()Returns a value as aBooleanarray.java.util.List<java.lang.Boolean>getValueAsBooleanList()Returns a value as aList<Boolean>.java.lang.DoublegetValueAsDouble()Returns a value as aDouble.java.lang.Double[]getValueAsDoubleArray()Returns a value as aDoublearray.java.util.List<java.lang.Double>getValueAsDoubleList()Returns a value as aList<Double>.java.lang.FloatgetValueAsFloat()Returns a value as aFloat.java.lang.Float[]getValueAsFloatArray()Returns a value as aFloatarray.java.util.List<java.lang.Float>getValueAsFloatList()Returns a value as aList<Float>.java.lang.IntegergetValueAsInt()Returns a value as anInteger.java.lang.Integer[]getValueAsIntArray()Returns a value as anIntegerarray.java.util.List<java.lang.Integer>getValueAsIntList()Returns a value as aList<Integer>.java.lang.LonggetValueAsLong()Returns a value as aLong.java.lang.Long[]getValueAsLongArray()Returns a value as aLongarray.java.util.List<java.lang.Long>getValueAsLongList()Returns a value as aList<Long>.ParametersgetValueAsParameters()Returns a value as aParameters.Parameters[]getValueAsParametersArray()Returns a value as aParametersarray.java.util.List<Parameters>getValueAsParametersList()Returns a value as aList<Parameters>.java.lang.StringgetValueAsString()Returns a value as aString.java.lang.String[]getValueAsStringArray()Returns a value as aStringarray.java.util.List<java.lang.String>getValueAsStringList()Returns a value as aList<String>.java.util.List<?>getValueList()Returns a value as aList.java.lang.Object[]getValues()Returns a value as anObjectarray.ValueTypegetValueType()Returns the parameter value type.booleanhasValue()Returns whether a non-null value has been assigned.booleanisArray()Returns whether the parameter value is an array.booleanisAssigned()Returns whether a parameter has been assigned a value.booleanisBracketed()Returns whether the value of the array is represented using square brackets.booleanisValueTypeFixed()Returns whether this is a predefined parameter.booleanisValueTypeHinted()Returns whether the value type is hinted.<T extends Parameters>
TnewParameters(Parameter identifier)Creates a new instance ofParameterswith the specified identifierParameter.voidputValue(java.lang.Object value)Puts the parameter value.voidsetBracketed(boolean bracketed)voidsetContainer(Parameters container)voidsetValueType(ValueType valueType)Sets the parameter value type.voidsetValueTypeHinted(boolean valueTypeHinted)Sets whether the value type is hinted.java.lang.StringtoString()
-
-
-
Constructor Detail
-
ParameterValue
public ParameterValue(java.lang.String name, ValueType valueType)
-
ParameterValue
public ParameterValue(java.lang.String name, ValueType valueType, boolean array)
-
ParameterValue
public ParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket)
-
ParameterValue
protected ParameterValue(java.lang.String name, ValueType valueType, boolean array, boolean noBracket, boolean valueTypeFixed)
-
ParameterValue
public ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass)
-
ParameterValue
public ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array)
-
ParameterValue
public ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket)
-
ParameterValue
protected ParameterValue(java.lang.String name, java.lang.Class<? extends AbstractParameters> parametersClass, boolean array, boolean noBracket, boolean valueTypeFixed)
-
-
Method Detail
-
getContainer
public Parameters getContainer()
Description copied from interface:ParameterReturns theParametersthat contains theParameter.- Specified by:
getContainerin interfaceParameter- Returns:
- the
Parameters
-
setContainer
public void setContainer(Parameters container)
-
getName
public java.lang.String getName()
Description copied from interface:ParameterReturns the parameter name.
-
getQualifiedName
public java.lang.String getQualifiedName()
Description copied from interface:ParameterReturns the fully qualified parameter name.- Specified by:
getQualifiedNamein interfaceParameter- Returns:
- the qualified name
-
getValueType
public ValueType getValueType()
Description copied from interface:ParameterReturns the parameter value type.- Specified by:
getValueTypein interfaceParameter- Returns:
- the parameter value type
-
setValueType
public void setValueType(ValueType valueType)
Description copied from interface:ParameterSets the parameter value type.- Specified by:
setValueTypein interfaceParameter- Parameters:
valueType- the parameter value type
-
isValueTypeFixed
public boolean isValueTypeFixed()
Description copied from interface:ParameterReturns whether this is a predefined parameter.- Specified by:
isValueTypeFixedin interfaceParameter- Returns:
trueif this is a predefined parameter, otherwisefalse
-
isValueTypeHinted
public boolean isValueTypeHinted()
Description copied from interface:ParameterReturns whether the value type is hinted.- Specified by:
isValueTypeHintedin interfaceParameter- Returns:
- true if the value type is hinted; false otherwise
-
setValueTypeHinted
public void setValueTypeHinted(boolean valueTypeHinted)
Description copied from interface:ParameterSets whether the value type is hinted.- Specified by:
setValueTypeHintedin interfaceParameter- Parameters:
valueTypeHinted- true if the value type is hinted; false otherwise
-
isArray
public boolean isArray()
Description copied from interface:ParameterReturns whether the parameter value is an array.
-
isBracketed
public boolean isBracketed()
Description copied from interface:ParameterReturns whether the value of the array is represented using square brackets.- Specified by:
isBracketedin interfaceParameter- Returns:
trueif the value of the array is represented using square brackets, otherwisefalse
-
setBracketed
public void setBracketed(boolean bracketed)
-
isAssigned
public boolean isAssigned()
Description copied from interface:ParameterReturns whether a parameter has been assigned a value. Even if a null is assigned, it is valid.- Specified by:
isAssignedin interfaceParameter- Returns:
trueif a parameter has been assigned a value, otherwisefalse
-
hasValue
public boolean hasValue()
Description copied from interface:ParameterReturns whether a non-null value has been assigned.
-
getArraySize
public int getArraySize()
Description copied from interface:ParameterReturns the size of the array if the value is an array.- Specified by:
getArraySizein interfaceParameter- Returns:
- the size of the array
-
arraylize
public void arraylize()
Description copied from interface:ParameterChange parameter type to array type.
-
putValue
public void putValue(java.lang.Object value)
Description copied from interface:ParameterPuts the parameter value.
-
clearValue
public void clearValue()
Description copied from interface:ParameterClears the parameter value.- Specified by:
clearValuein interfaceParameter
-
getValue
public java.lang.Object getValue()
Description copied from interface:ParameterReturns a value as anObject.
-
getValueList
public java.util.List<?> getValueList()
Description copied from interface:ParameterReturns a value as aList.- Specified by:
getValueListin interfaceParameter- Returns:
- a
List
-
getValues
public java.lang.Object[] getValues()
Description copied from interface:ParameterReturns a value as anObjectarray.
-
getValueAsString
public java.lang.String getValueAsString()
Description copied from interface:ParameterReturns a value as aString.- Specified by:
getValueAsStringin interfaceParameter- Returns:
- a
String
-
getValueAsStringArray
public java.lang.String[] getValueAsStringArray()
Description copied from interface:ParameterReturns a value as aStringarray.- Specified by:
getValueAsStringArrayin interfaceParameter- Returns:
- a
Stringarray
-
getValueAsStringList
public java.util.List<java.lang.String> getValueAsStringList()
Description copied from interface:ParameterReturns a value as aList<String>.- Specified by:
getValueAsStringListin interfaceParameter- Returns:
- a
List<String>
-
getValueAsInt
public java.lang.Integer getValueAsInt()
Description copied from interface:ParameterReturns a value as anInteger.- Specified by:
getValueAsIntin interfaceParameter- Returns:
- an
Integer
-
getValueAsIntArray
public java.lang.Integer[] getValueAsIntArray()
Description copied from interface:ParameterReturns a value as anIntegerarray.- Specified by:
getValueAsIntArrayin interfaceParameter- Returns:
- an
Integerarray
-
getValueAsIntList
public java.util.List<java.lang.Integer> getValueAsIntList()
Description copied from interface:ParameterReturns a value as aList<Integer>.- Specified by:
getValueAsIntListin interfaceParameter- Returns:
- a
List<Integer>
-
getValueAsLong
public java.lang.Long getValueAsLong()
Description copied from interface:ParameterReturns a value as aLong.- Specified by:
getValueAsLongin interfaceParameter- Returns:
- a
Long
-
getValueAsLongArray
public java.lang.Long[] getValueAsLongArray()
Description copied from interface:ParameterReturns a value as aLongarray.- Specified by:
getValueAsLongArrayin interfaceParameter- Returns:
- a
Longarray
-
getValueAsLongList
public java.util.List<java.lang.Long> getValueAsLongList()
Description copied from interface:ParameterReturns a value as aList<Long>.- Specified by:
getValueAsLongListin interfaceParameter- Returns:
- a
List<Long>
-
getValueAsFloat
public java.lang.Float getValueAsFloat()
Description copied from interface:ParameterReturns a value as aFloat.- Specified by:
getValueAsFloatin interfaceParameter- Returns:
- a
Float
-
getValueAsFloatArray
public java.lang.Float[] getValueAsFloatArray()
Description copied from interface:ParameterReturns a value as aFloatarray.- Specified by:
getValueAsFloatArrayin interfaceParameter- Returns:
- a
Floatarray
-
getValueAsFloatList
public java.util.List<java.lang.Float> getValueAsFloatList()
Description copied from interface:ParameterReturns a value as aList<Float>.- Specified by:
getValueAsFloatListin interfaceParameter- Returns:
- a
List<Float>
-
getValueAsDouble
public java.lang.Double getValueAsDouble()
Description copied from interface:ParameterReturns a value as aDouble.- Specified by:
getValueAsDoublein interfaceParameter- Returns:
- a
Double
-
getValueAsDoubleArray
public java.lang.Double[] getValueAsDoubleArray()
Description copied from interface:ParameterReturns a value as aDoublearray.- Specified by:
getValueAsDoubleArrayin interfaceParameter- Returns:
- a
Doublearray
-
getValueAsDoubleList
public java.util.List<java.lang.Double> getValueAsDoubleList()
Description copied from interface:ParameterReturns a value as aList<Double>.- Specified by:
getValueAsDoubleListin interfaceParameter- Returns:
- a
List<Double>
-
getValueAsBoolean
public java.lang.Boolean getValueAsBoolean()
Description copied from interface:ParameterReturns a value as aBoolean.- Specified by:
getValueAsBooleanin interfaceParameter- Returns:
- a
Boolean
-
getValueAsBooleanArray
public java.lang.Boolean[] getValueAsBooleanArray()
Description copied from interface:ParameterReturns a value as aBooleanarray.- Specified by:
getValueAsBooleanArrayin interfaceParameter- Returns:
- a
Booleanarray
-
getValueAsBooleanList
public java.util.List<java.lang.Boolean> getValueAsBooleanList()
Description copied from interface:ParameterReturns a value as aList<Boolean>.- Specified by:
getValueAsBooleanListin interfaceParameter- Returns:
- a
List<Boolean>
-
getValueAsParameters
public Parameters getValueAsParameters()
Description copied from interface:ParameterReturns a value as aParameters.- Specified by:
getValueAsParametersin interfaceParameter- Returns:
- a
Parameters
-
getValueAsParametersArray
public Parameters[] getValueAsParametersArray()
Description copied from interface:ParameterReturns a value as aParametersarray.- Specified by:
getValueAsParametersArrayin interfaceParameter- Returns:
- a
Parametersarray
-
getValueAsParametersList
public java.util.List<Parameters> getValueAsParametersList()
Description copied from interface:ParameterReturns a value as aList<Parameters>.- Specified by:
getValueAsParametersListin interfaceParameter- Returns:
- a
List<Parameters>
-
newParameters
public <T extends Parameters> T newParameters(Parameter identifier)
Description copied from interface:ParameterCreates a new instance ofParameterswith the specified identifierParameter.- Specified by:
newParametersin interfaceParameter- Type Parameters:
T- the type of the new Parameters object- Parameters:
identifier- the specified identifierParameter- Returns:
- a
Parameters
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-