public class Value extends BaseEntity
Every Property can return one of many values, or multiple values
if it's a list property. For example: SupportedBearers returns a list of
the bearers that the device can support.
Class contains metadata related to this value including the display name,
description and URL to find out additional information. Metadata can be used
by UI developers to provide users with more information about the meaning and
intended use of this value. Access metadata like:
value.getDescription(); and value.getUrl();.
Objects of this class should not be created directly as they are part of the
internal logic. Use the relevant Dataset method to access these
objects.
For more information see: 51Degrees pattern data model.
| Modifier and Type | Field and Description |
|---|---|
static int |
RECORD_LENGTH
The length in bytes of the value record in the data file.
|
dataSet, index| Constructor and Description |
|---|
Value(Dataset dataSet,
int index,
BinaryReader reader)
Constructs a new instance of Value.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(String value)
Compares two values by name.
|
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.
|
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() |
int |
toInt()
Returns the value as an integer.
|
String |
toString()
Returns the value as a string.
|
compareTo, compareTo, getDataSet, getIndex, getIsNumeric, getNumber, readIntegerArraypublic static final int RECORD_LENGTH
public Value(Dataset dataSet, int index, BinaryReader reader)
dataSet - the Dataset the value is contained within.index - the index in the data structure to the value.reader - Reader connected to the source data structure and
positioned to start reading.public String getName() throws IOException
IOException - if there was a problem accessing data file.public Signature[] getSignatures() throws IOException
signatures that the value
is associated with.IOException - if there was a problem accessing data file.public Profile[] getProfiles() throws IOException
profiles this value is
associated with.IOException - if there was a problem accessing data file.public Property getProperty() throws IOException
Property the value relates to.IOException - if there was a problem accessing data file.public Component getComponent() throws IOException
Component the value relates to.IOException - if there was a problem accessing data file.public String getDescription() throws IOException
IOException - if there was a problem accessing data file.public URL getUrl() throws IOException
IOException - if there was a problem accessing data file.public void init()
throws IOException
This method should not be called as it is part of the internal logic.
IOException - if there was a problem accessing data file.public int compareTo(String value)
value - name of value to compare the current value against.public int compareTo(Value other)
other - The value to be compared against.public String toString()
public double toDouble()
throws IOException
IOException - if there was a problem accessing data file.public boolean toBool()
throws IOException
IOException - if there was a problem accessing data file.public boolean getIsDefault()
throws IOException
IOException - if there was a problem accessing data file.public int toInt()
throws IOException
IOException - if there was a problem accessing data file.Copyright © 2015 51Degrees. All rights reserved.