public class Values extends Object
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.
| Constructor and Description |
|---|
Values(Property property,
Value[] values)
Constructs a new instance of the values list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Value item)
Checks if a value is present in this list.
|
void |
copyTo(Value[] array,
int arrayIndex)
Makes a copy of the current array of values to the provided array.
|
int |
count() |
Value |
get(int index)
Gets the element at index.
|
Value |
get(String valueName)
Returns the value by name.
|
Value[] |
getAll() |
boolean |
getIsDefault()
Returns true if any of the values are the null values for the property.
|
boolean |
toBool()
The value represented as a boolean.
|
double |
toDouble()
The value represented as a double.
|
String |
toString()
The values represented as a string where multiple values are separated
by colons.
|
String[] |
toStringArray()
Returns the values as a string array.
|
public boolean toBool()
throws IOException
IOException - if there was a problem accessing data file.public double toDouble()
throws IOException
IOException - if there was a problem accessing data file.public String[] toStringArray() throws IOException
Value objects.IOException - if there was a problem accessing data file.public String toString()
public boolean getIsDefault()
throws IOException
IOException - if there was a problem accessing data file.public Value get(String valueName) throws IOException
valueName - name of the Value required.IOException - if there was a problem accessing data file.public Value get(int index)
index - of the element in the array.Value at provided index, or null if out of bounds.public boolean contains(Value item)
item - Value to check for.public void copyTo(Value[] array, int arrayIndex)
array - of Value objects.arrayIndex - copy from.public int count()
Value objects.Copyright © 2017 51Degrees. All rights reserved.