Package db
Class IntField
- java.lang.Object
-
- db.Field
-
- db.IntField
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class db.Field
Field.UnsupportedFieldException
-
-
Field Summary
Fields Modifier and Type Field Description static IntField
INSTANCE
static IntField
MAX_VALUE
Maximum integer field valuestatic IntField
MIN_VALUE
Minimum integer field valuestatic IntField
ZERO_VALUE
Zero int field value-
Fields inherited from class db.Field
EMPTY_ARRAY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Field o)
IntField
copyField()
Create new instance of this field with the same value.boolean
equals(java.lang.Object obj)
byte[]
getBinaryData()
Get data as a byte array.int
getIntValue()
Get field as an integer value.long
getLongValue()
Get field as a long value.java.lang.String
getValueAsString()
Get field value as a formatted stringint
hashCode()
IntField
newField()
Create new instance of this field type.void
setBinaryData(byte[] bytes)
Set data from binary byte array.void
setIntValue(int value)
Set field's integer value.void
setLongValue(long value)
Set field's long value.java.lang.String
toString()
-
Methods inherited from class db.Field
canIndex, getBooleanValue, getByteValue, getShortValue, getString, isSameType, isVariableLength, setBooleanValue, setByteValue, setShortValue, setString
-
-
-
-
Method Detail
-
getIntValue
public int getIntValue()
Description copied from class:Field
Get field as an integer value.- Overrides:
getIntValue
in classField
- Returns:
- integer value
-
setIntValue
public void setIntValue(int value)
Description copied from class:Field
Set field's integer value.- Overrides:
setIntValue
in classField
- Parameters:
value
- integer value
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getValueAsString
public java.lang.String getValueAsString()
Description copied from class:Field
Get field value as a formatted string- Specified by:
getValueAsString
in classField
- Returns:
- field value string
-
compareTo
public int compareTo(Field o)
-
copyField
public IntField copyField()
Description copied from class:Field
Create new instance of this field with the same value.
-
newField
public IntField newField()
Description copied from class:Field
Create new instance of this field type.
-
getLongValue
public long getLongValue()
Description copied from class:Field
Get field as a long value. All fixed-length field objects must implement this method- Overrides:
getLongValue
in classField
- Returns:
- long value
-
setLongValue
public void setLongValue(long value)
Description copied from class:Field
Set field's long value. All fixed-length field objects must implement this method- Overrides:
setLongValue
in classField
- Parameters:
value
- long value
-
getBinaryData
public byte[] getBinaryData()
Description copied from class:Field
Get data as a byte array.- Specified by:
getBinaryData
in classField
- Returns:
- byte[]
-
setBinaryData
public void setBinaryData(byte[] bytes)
Description copied from class:Field
Set data from binary byte array. All variable-length fields must implement this method.- Specified by:
setBinaryData
in classField
- Parameters:
bytes
- field data
-
-