public class Value extends BaseEntity implements Comparable<Value>
| Modifier and Type | Field and Description |
|---|---|
private Boolean |
asBool |
private Double |
asNumber |
private String |
description |
private int |
descriptionIndex |
private String |
name |
private int |
nameIndex |
private Profile[] |
profiles |
private Property |
property |
(package private) int |
propertyIndex |
static int |
RECORD_LENGTH
The length in bytes of the value record in the data file.
|
private Signature[] |
signatures |
private URL |
url |
private int |
urlIndex |
| Constructor and Description |
|---|
Value(Dataset dataSet,
int index,
BinaryReader reader)
Constructs a new instance of Value
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Value other)
Compares this value to another using the index field if they're in the
same list other wise the name value.
|
private Profile[] |
doGetProfiles()
Gets all the profiles associated with the value.
|
private Signature[] |
doGetSignatures()
Gets all the signatures associated with the value.
|
Component |
getComponent() |
String |
getDescription() |
boolean |
getIsDefault()
Returns true if the value is the null value for the property.
|
String |
getName() |
Profile[] |
getProfiles() |
Property |
getProperty() |
Signature[] |
getSignatures() |
URL |
getUrl() |
void |
init()
Called after the entire data set has been loaded to ensure any further
initialisation steps that require other items in the data set can be
completed.
|
boolean |
toBool() |
double |
toDouble() |
String |
toString()
Returns the value as a string.
|
binarySearch, getDataSet, getIndex, readIntegerArraypublic static final int RECORD_LENGTH
private String name
private final int nameIndex
private Signature[] signatures
private Profile[] profiles
private Property property
final int propertyIndex
private String description
private final int descriptionIndex
private URL url
private final int urlIndex
private Double asNumber
private Boolean asBool
public Value(Dataset dataSet, int index, BinaryReader reader)
dataSet - The data set the value is contained withinindex - The index in the data structure to the valuereader - Reader connected to the source data structure and
positioned to start readingpublic String getName() throws IOException
IOExceptionpublic Signature[] getSignatures() throws IOException
IOExceptionpublic Profile[] getProfiles() throws IOException
IOExceptionpublic Property getProperty() throws IOException
IOExceptionpublic Component getComponent() throws IOException
IOExceptionpublic String getDescription() throws IOException
IOExceptionpublic URL getUrl() throws IOException
IOExceptionpublic void init()
throws IOException
IOExceptionprivate Profile[] doGetProfiles() throws IOException
IOExceptionprivate Signature[] doGetSignatures() throws IOException
IOExceptionpublic int compareTo(Value other)
compareTo in interface Comparable<Value>other - The value to be compared againstpublic String toString()
public double toDouble()
throws IOException
IOExceptionpublic boolean toBool()
throws IOException
IOExceptionpublic boolean getIsDefault()
throws IOException
IOException