|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.core.pmml.Array
public class Array
Class for encapsulating a PMML Array element.
Nested Class Summary | |
---|---|
static class |
Array.ArrayType
|
Method Summary | |
---|---|
boolean |
contains(double value)
Returns true if the array contains this real value. |
boolean |
contains(float value)
Returns true if the array contains this real value. |
boolean |
contains(int value)
Returns true if the array contains this integer value. |
boolean |
contains(java.lang.String value)
Returns true if the array contains this string value. |
static Array |
create(org.w3c.dom.Element arrayE)
Static factory method for creating non-sparse or sparse array types as needed. |
Array.ArrayType |
getType()
Get the type of this array. |
static boolean |
isArray(org.w3c.dom.Element arrayE)
Utility method to check if an XML element is an array. |
boolean |
isSparse()
Is this array a SparseArray? |
int |
numValues()
Get the number of values in this array. |
java.lang.String |
toString()
|
java.lang.String |
value(int index)
Gets the value at index from the array. |
double |
valueDouble(int index)
Gets the value at index from the array as a double. |
float |
valueFloat(int index)
Gets the value at index from the array as a float. |
int |
valueInt(int index)
Gets the value at index from the array as an int. |
java.lang.String |
valueSparse(int indexOfIndex)
Gets the value at indexOfIndex from the array. |
double |
valueSparseDouble(int indexOfIndex)
Gets the value at indexOfIndex from the array. |
float |
valueSparseFloat(int indexOfIndex)
Gets the value at indexOfIndex from the array. |
int |
valueSparseInt(int indexOfIndex)
Gets the value at indexOfIndex from the array. |
java.lang.String |
valueSparseString(int indexOfIndex)
Gets the value at indexOfIndex from the array. |
java.lang.String |
valueString(int index)
Gets the value at index from the array as a String. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static boolean isArray(org.w3c.dom.Element arrayE)
arrayE
- the XML element to check
public static Array create(org.w3c.dom.Element arrayE) throws java.lang.Exception
arrayE
- the XML element encapsulating the array
java.lang.Exception
- if there is a problem when constructing the arraypublic Array.ArrayType getType()
public boolean isSparse()
public int numValues()
public boolean contains(java.lang.String value)
value
- the value to check for.
public boolean contains(int value)
value
- the value to check for
public boolean contains(double value)
value
- the value to check for
public boolean contains(float value)
value
- the value to check for
public java.lang.String value(int index) throws java.lang.Exception
index
- the index of the value to get.
java.lang.Exception
- if index is out of bounds.public java.lang.String valueString(int index) throws java.lang.Exception
index
- the index of the value to get.
java.lang.Exception
- if index is out of bounds.public double valueDouble(int index) throws java.lang.Exception
index
- the index of the value to get.
java.lang.Exception
- if index is out of bounds.public float valueFloat(int index) throws java.lang.Exception
index
- the index of the value to get.
java.lang.Exception
- if index is out of bounds.public int valueInt(int index) throws java.lang.Exception
index
- the index of the value to get.
java.lang.Exception
- if index is out of bounds.public java.lang.String valueSparse(int indexOfIndex) throws java.lang.Exception
indexOfIndex
- the index of the index of the value to get.
java.lang.Exception
- if indexOfIndex is out of bounds.public java.lang.String valueSparseString(int indexOfIndex) throws java.lang.Exception
indexOfIndex
- the index of the index of the value to get.
java.lang.Exception
- if indexOfIndex is out of bounds.public double valueSparseDouble(int indexOfIndex) throws java.lang.Exception
indexOfIndex
- the index of the index of the value to get.
java.lang.Exception
- if indexOfIndex is out of bounds.public float valueSparseFloat(int indexOfIndex) throws java.lang.Exception
indexOfIndex
- the index of the index of the value to get.
java.lang.Exception
- if indexOfIndex is out of bounds.public int valueSparseInt(int indexOfIndex) throws java.lang.Exception
indexOfIndex
- the index of the index of the value to get.
java.lang.Exception
- if indexOfIndex is out of bounds.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |