XPRMRecord
- java.lang.Object
-
- com.dashoptimization.XPRMValue
-
- com.dashoptimization.XPRMRecord
-
-
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 XPRMRecordasRecord()A record.XPRMRecordFieldsfields()Get an iterator to enumerate all fields of the record.intgetStructCode()Structure code.java.lang.StringgetStructName()String representation of structure.intgetTypeCode()Type code.java.lang.StringgetTypeName()String representation of type.XPRMValuegetValue(XPRMRecordField field)Get the value of a field of the recordbooleangetValueAsBoolean(XPRMRecordField field)Get the value of a boolean field of the recordintgetValueAsInteger(XPRMRecordField field)Get the value of an integer field of the recorddoublegetValueAsReal(XPRMRecordField field)Get the value of a real field of the recordjava.lang.StringgetValueAsString(XPRMRecordField field)Get the value of a string field of the recordbooleanisInitialised()Check whether the record has been initialised.java.lang.StringtoString()Generate a string representation of the content of the record.
-
-
-
Method Detail
-
asRecord
public final XPRMRecord asRecord()
Description copied from class:XPRMValueA record. This function is defined if the actual object is a record.- Overrides:
-
asRecordin classXPRMValue - Returns:
-
The record as a
XPRMRecord
-
isInitialised
public final boolean isInitialised()
Check whether the record 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 record has been created
-
fields
public XPRMRecordFields fields()
Get an iterator to enumerate all fields of the record.- Returns:
- A field iterator
-
getValue
public XPRMValue getValue(XPRMRecordField field)
Get the value of a field of the record- Parameters:
-
field- field to access - Returns:
-
The field value as an
XPRMValue
-
getValueAsInteger
public int getValueAsInteger(XPRMRecordField field)
Get the value of an integer field of the record- Parameters:
-
field- field to access - Returns:
-
The field value as an
int
-
getValueAsReal
public double getValueAsReal(XPRMRecordField field)
Get the value of a real field of the record- Parameters:
-
field- field to access - Returns:
-
The field value as a
double
-
getValueAsString
public java.lang.String getValueAsString(XPRMRecordField field)
Get the value of a string field of the record- Parameters:
-
field- field to access - Returns:
-
The field value as a
String
-
getValueAsBoolean
public boolean getValueAsBoolean(XPRMRecordField field)
Get the value of a boolean field of the record- Parameters:
-
field- field to access - Returns:
-
The field value as a
boolean
-
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 record.- Overrides:
-
toStringin classjava.lang.Object - Returns:
- String describing the record content
-
-
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
