Class ArrayIndex
- java.lang.Object
-
- com.inductiveautomation.ignition.common.ArrayIndex
-
- All Implemented Interfaces:
SubIndex
,java.io.Serializable
public class ArrayIndex extends java.lang.Object implements SubIndex
A simple structure that holds an index into a single or double column array.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ArrayIndex(int row)
ArrayIndex(int row, int col)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
QualifiedValue
extractValue(java.lang.Object source)
Pulls the value out of a qualified value.int
getCol()
int
getRow()
boolean
hasCol()
int
hashCode()
static boolean
isArrayIndex(java.lang.String value)
boolean
isCompatible(java.lang.Class<?> dataClazz)
Returns whether this sub index can be used with the incoming value type.static ArrayIndex
parse(java.lang.String value)
A very simple parse mechanism.java.lang.String
toEncodedString()
Returns the index in a way that can be appended to a path.QualityCode
updateValue(java.lang.Object sourceValue, java.lang.Object elementValue)
-
-
-
Method Detail
-
isArrayIndex
public static boolean isArrayIndex(java.lang.String value)
-
getRow
public int getRow()
-
getCol
public int getCol()
-
hasCol
public boolean hasCol()
-
parse
public static ArrayIndex parse(java.lang.String value)
A very simple parse mechanism. Allows: "[x]", "[x,y]", "x", "x,y"
-
isCompatible
public boolean isCompatible(java.lang.Class<?> dataClazz)
Description copied from interface:SubIndex
Returns whether this sub index can be used with the incoming value type.- Specified by:
isCompatible
in interfaceSubIndex
-
extractValue
public QualifiedValue extractValue(java.lang.Object source)
Description copied from interface:SubIndex
Pulls the value out of a qualified value. The resulting value will have the same timestamp and quality as the source, unless a new quality is generated as a result of trying to extract the. Returns any errors as quality on the value.- Specified by:
extractValue
in interfaceSubIndex
-
updateValue
public QualityCode updateValue(java.lang.Object sourceValue, java.lang.Object elementValue)
- Specified by:
updateValue
in interfaceSubIndex
-
toEncodedString
public java.lang.String toEncodedString()
Description copied from interface:SubIndex
Returns the index in a way that can be appended to a path. Should return a value that can be read by a static parse function on the implementation.- Specified by:
toEncodedString
in interfaceSubIndex
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-