public class TwoDimensionalValueObject extends ValueObject
Modifier and Type | Field and Description |
---|---|
static char |
SLIM_FORMAT_TYPE |
static java.lang.String |
TIME_COLUMN_NAME
Property identifier for the "has time" property.
|
defaultTTL, locale, traceDefault, valueForTrue
ANYTYPE, ARRAYTYPE, BINARYTYPE, BOOLEANTYPE, BYTETYPE, CHARTYPE, DISPLAYVALUE, DOUBLETYPE, FLOATTYPE, GROUP_NAME, INITIALVALUE, INTTYPE, LOG_MESSAGE, LONGTYPE, NAME, OBJECTTYPE, ORDER, PASSWORD_DIGEST, PROPERTYTYPE, QUALITY_BAD, QUALITY_COMM_FAILURE, QUALITY_DEVICE_FAILURE, QUALITY_EGU_EXCEEDED, QUALITY_EVALUATION_EXPIRED, QUALITY_GOOD, QUALITY_IMPOSSIBLE, QUALITY_INITIAL, QUALITY_LAST_USABLE, QUALITY_OUT_OF_SERVICE, QUALITY_PROPERTYONLY, QUALITY_REMOTE_PROXY_INIT, QUALITY_SIMULATED, QUALITY_SOURCE_REMOVED, QUALITY_TRANSITIONAL, QUALITY_UNKNOWN, QUALITY_WARNING, QUALITY_WORST, QUALITY_WRITE_IN_PROGRESS, REQUESTCURRENTVALUE, REQUESTHISTORICAL, SHORTTYPE, STRINGTYPE, TRACE, TWODTYPE, UNSIGNEDBYTETYPE, UNSIGNEDINTTYPE, UNSIGNEDLONGTYPE, UNSIGNEDSHORTTYPE, USER_NAME
Constructor and Description |
---|
TwoDimensionalValueObject()
This is the generic constructor.
|
TwoDimensionalValueObject(int columns)
This is the generic constructor , it creates an object in the default locale.
|
TwoDimensionalValueObject(int columns,
java.util.Locale locale)
This is the generic constructor.
|
TwoDimensionalValueObject(java.util.Locale locale)
This is the generic constructor.
|
TwoDimensionalValueObject(java.util.Vector<java.util.Vector<ValueObjectInterface>> values,
java.util.Locale locale)
This is the generic constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRow(java.util.Vector<ValueObjectInterface> newValues)
This will add a new row.
|
ValueObjectInterface |
copy()
Returns a deep copy of the value object.
|
void |
deleteRow(int rowIndex)
Deletes the row.
|
boolean |
equals(java.lang.Object obj)
Compare the string values
|
boolean |
getBoolValue()
Returns the current value represented as a boolean.
|
byte |
getByteValue()
Returns the current value represented as an byte.
|
char |
getCharValue()
Returns the current value represented as a char.
|
int |
getColumnCount()
This will return the number of columns.
|
java.util.Vector<ValueObjectInterface> |
getColumnData(int columnIndex)
This is used to get all the data for a specific column.
|
java.lang.String |
getColumnName(int columnIndex)
This will return the name of a sepecific column.
|
java.util.Vector<java.lang.String> |
getColumnNames()
This will return the vector of names.
|
double |
getDoubleValue()
Returns the current value represented as a float.
|
float |
getFloatValue()
Returns the current value represented as an float.
|
int |
getIntValue()
Returns the current value represented as an integer.
|
java.util.Locale |
getLocale()
This method returns the Locale that this object was created in.
|
long |
getLongValue()
Returns the current value represented as a long.
|
double |
getNumericValue()
Returns the double value, but will throw an exception if the object isn't convertable.
|
java.lang.Object |
getObjectValue()
Returns the current value represented as an Object.
|
java.util.Vector<ValueObjectInterface> |
getRow(int rowIndex)
This will return a Vector of values for the given row.
|
int |
getRowCount()
This will return the number of rows.
|
short |
getShortValue()
Returns the current value represented as a short.
|
java.lang.String |
getStringValue()
Returns the current value represented as an String.
|
java.lang.String |
getTimeColumnName()
Returns the "HAS_TIME" property of the value object.
|
ValueObjectInterface |
getValueAt(int rowIndex,
int columnIndex)
This will return the value at a specific location.
|
int |
hashCode() |
boolean |
hasTimeColumn()
Return whether the TwoDimensionalValueObject has a time column
|
boolean |
isCellEditable(int rowIndex,
int columnIndex)
This will return false.
|
boolean |
isEncodeFat() |
void |
setColumn(int columns)
This will set the column count to "columns" and reset
any data inside the 2d value object.
|
void |
setColumnAt(java.util.Vector<ValueObjectInterface> column,
int index)
This will replace the column at the give index with the new column.
|
void |
setColumnName(java.lang.String name,
int columnIndex)
This will set the applicationName of a specific column.
|
void |
setColumnNames(java.util.Vector<java.lang.String> names)
This will return the vector of names.
|
void |
setEncodeFat(boolean encodeFat) |
void |
setTimeColumnName(java.lang.String timeColumnName)
Sets the "HAS_TIME" property of the value object.
|
void |
setValueAt(ValueObjectInterface aValue,
int rowIndex,
int columnIndex)
The new value replaces the existing value at the row and column index provided.
|
void |
sort(int column,
boolean descending)
Sort the values.
|
java.lang.String |
toJSON(boolean incFormatted,
boolean stringDate,
java.lang.String dateFormat)
Build a json representation of the object, structured:
{
"type": "object"|"array"|"2d",
"value": \
|
java.lang.String |
toSlimJSON() |
acquireLatestPropertiesFrom, acquirePropertiesFrom, attributeNames, compareTo, convertToLowestPrecisionNumber, decrementTTL, escapeJSON, getAlwaysSend, getBinaryValue, getColor, getDate, getLowestPrecisionValueObject, getProperties, getProperty, getQuality, getQualityString, getTime, getTimeMillis, getTTL, getType, getValueObject, getValueObject, getValueObject, getValueObject, getValueObject, getValueObject, getValueObject, getValueObject, getValueObject, getValueObject, getValueObject, replaces, setAlwaysSend, setColor, setDate, setLocale, setProperty, setQuality, setTimeMillis, setTTL, setType, setValueForTrue, shouldTrace, toJSON, toJSON, toString
public static final char SLIM_FORMAT_TYPE
public static final java.lang.String TIME_COLUMN_NAME
public TwoDimensionalValueObject()
public TwoDimensionalValueObject(int columns)
public TwoDimensionalValueObject(int columns, java.util.Locale locale)
public TwoDimensionalValueObject(java.util.Locale locale)
public TwoDimensionalValueObject(java.util.Vector<java.util.Vector<ValueObjectInterface>> values, java.util.Locale locale)
public void addRow(java.util.Vector<ValueObjectInterface> newValues)
public ValueObjectInterface copy()
public void deleteRow(int rowIndex)
rowIndex
- the row to deletepublic boolean equals(java.lang.Object obj)
ValueObject
equals
in interface ValueObjectInterface
equals
in class ValueObject
public boolean getBoolValue()
public byte getByteValue()
public char getCharValue()
public int getColumnCount()
public java.util.Vector<ValueObjectInterface> getColumnData(int columnIndex)
public java.lang.String getColumnName(int columnIndex)
public java.util.Vector<java.lang.String> getColumnNames()
public double getDoubleValue()
ValueObjectInterface.getNumericValue()
public float getFloatValue()
public int getIntValue()
public java.util.Locale getLocale()
getLocale
in interface ValueObjectInterface
getLocale
in class ValueObject
public long getLongValue()
public double getNumericValue() throws java.lang.NumberFormatException
java.lang.NumberFormatException
ValueObjectInterface.getDoubleValue()
public java.lang.Object getObjectValue()
public java.util.Vector<ValueObjectInterface> getRow(int rowIndex)
public int getRowCount()
public short getShortValue()
public java.lang.String getStringValue()
public java.lang.String getTimeColumnName()
public ValueObjectInterface getValueAt(int rowIndex, int columnIndex)
rowIndex
- zero-based row index.columnIndex
- zero-based column index.public int hashCode()
hashCode
in class ValueObject
public boolean hasTimeColumn()
public boolean isCellEditable(int rowIndex, int columnIndex)
public boolean isEncodeFat()
public void setColumn(int columns)
public void setColumnAt(java.util.Vector<ValueObjectInterface> column, int index)
column
- the new dataindex
- the index of the column to replace.public void setColumnName(java.lang.String name, int columnIndex)
public void setColumnNames(java.util.Vector<java.lang.String> names)
public void setEncodeFat(boolean encodeFat)
encodeFat
- the encodeFat to setpublic void setTimeColumnName(java.lang.String timeColumnName)
timeColumnName
- the name of the time column, which may be nullpublic void setValueAt(ValueObjectInterface aValue, int rowIndex, int columnIndex)
aValue
- the new value for the given locationrowIndex
- the row index for the new valuecolumnIndex
- the column index for the new valuepublic void sort(int column, boolean descending)
column
- the column to use for the sort orderingdescending
- true if the value should go from high to lowpublic java.lang.String toJSON(boolean incFormatted, boolean stringDate, java.lang.String dateFormat)
ValueObject
toJSON
in class ValueObject
incFormatted
- true if the string value of this value object is to be provided under the "formattedValue" keystringDate
- if true, the "timestamp" key will be a String of the form "yyyy-MM-dd HH:mm:ss.zzz"public java.lang.String toSlimJSON()
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.