XPRMList
- java.lang.Object
-
- com.dashoptimization.XPRMValue
-
- com.dashoptimization.XPRMList
-
-
Field Summary
-
Fields inherited from interface com.dashoptimization.XPRMTyped
GRP_DYN, GRP_GEN, MSK_FIN, MSK_GRP, MSK_STR, MSK_TYP, STR_ARRAY, STR_CONST, STR_LIST, STR_MEM, STR_NTYP, STR_PROB, STR_PROC, STR_REC, STR_REF, STR_SET, STR_UTYP, TYP_BOOL, TYP_EXTN, TYP_INT, TYP_LINCTR, TYP_MPVAR, TYP_NOT, TYP_REAL, TYP_STRING
-
-
Method Summary
Modifier and Type Method and Description XPRMListasList()A list.XPRMListElementselements()Get an iterator to enumerate all elements of the list.intgetSize()Get list size.intgetStructCode()Structure code.java.lang.StringgetStructName()String representation of structure.intgetTypeCode()Type code.java.lang.StringgetTypeName()String representation of type.booleanisDynamic()Check whether the list is dynamic.booleanisEmpty()Check whether the list is empty.booleanisInitialised()Check whether the list has been initialised.java.lang.StringtoString()Generate a string representation of the content of the list.
-
-
-
Method Detail
-
asList
public final XPRMList asList()
Description copied from class:XPRMValueA list. This function is defined if the actual object is a list.
-
isInitialised
public final boolean isInitialised()
Check whether the list has been initialised. Objects are initialised during model execution. Trying to access a Mosel object that has not been created will result on an exception.- Returns:
-
trueif the list has been created
-
isDynamic
public final boolean isDynamic()
Check whether the list is dynamic.- Returns:
-
trueif the list is dynamic
-
getSize
public final int getSize()
Get list size.- Returns:
- Number of elements in the list
-
isEmpty
public final boolean isEmpty()
Check whether the list is empty.- Returns:
-
trueif the list contains no element
-
elements
public XPRMListElements elements()
Get an iterator to enumerate all elements of the list.- Returns:
- A list element iterator
-
getTypeCode
public final int getTypeCode()
Description copied from interface:XPRMTypedType code. The code is one of theTYP_*values.- Returns:
- Encoded type
-
getTypeName
public final java.lang.String getTypeName()
Description copied from interface:XPRMTypedString representation of type.- Returns:
- Type name
-
getStructCode
public final int getStructCode()
Description copied from interface:XPRMTypedStructure code. The code is one of theSTR_*values.- Returns:
- Encoded structure
-
getStructName
public final java.lang.String getStructName()
Description copied from interface:XPRMTypedString representation of structure.- Returns:
- Structure name
-
toString
public final java.lang.String toString()
Generate a string representation of the content of the list.- Overrides:
-
toStringin classjava.lang.Object - Returns:
- String describing the list content
-
-
