public class VectorBase extends java.lang.Object implements SplusObject, java.io.Serializable
Constructor and Description |
---|
VectorBase()
Constructs a
Vector object. |
Modifier and Type | Method and Description |
---|---|
boolean[] |
getAsBooleanArray()
Helper method to transform this into a boolean array.
|
boolean[] |
getAsBooleanArray(boolean maskNA)
Helper method to transform this into a boolean array.
|
java.lang.Boolean[] |
getAsBooleanObjectArray()
Helper method to transform this into a
Boolean Object array. |
double[] |
getAsDoubleArray()
Helper method to transform this into a double array.
|
double[] |
getAsDoubleArray(double maskNA)
Helper method to transform this into a double array.
|
java.lang.Double[] |
getAsDoubleObjectArray()
Helper method to transform this into a double array.
|
int[] |
getAsIntegerArray()
Helper method to transform this into a integer array.
|
int[] |
getAsIntegerArray(int maskNA)
Helper method to transform this into a integer array.
|
java.lang.Integer[] |
getAsIntegerObjectArray()
Helper method to transform this into an Integer Object array.
|
java.lang.String[] |
getAsStringArray()
Helper method to transform a vector into a integer array.
|
java.util.List<Attr> |
getAttrs()
Retrieves the vector's
Attr objects. |
java.util.List<Item> |
getItems()
Retrieves the vector's
Item objects. |
java.lang.Integer |
getLength()
Retrieves the vector's length.
|
java.lang.String |
getName()
Retrieves the vector's name.
|
java.lang.String |
getType()
Retrieves the vector's type.
|
void |
setAttrs(java.util.List<Attr> attrs)
Sets the vector's
Attr objects. |
void |
setItems(java.util.List<Item> items)
Sets the vector's
Item objects. |
void |
setLength(int len)
Sets the vector length.
|
void |
setName(java.lang.String name)
Sets the vector's name.
|
void |
setType(java.lang.String type)
Sets the type of vector.
|
public final boolean[] getAsBooleanArray() throws java.lang.IllegalArgumentException
NA
is translated to
false
.java.lang.IllegalArgumentException
- if the type of this is not boolean.public final boolean[] getAsBooleanArray(boolean maskNA) throws java.lang.IllegalArgumentException
maskNA
- The value that NA
is translated to.java.lang.IllegalArgumentException
- if the type of this is not boolean.public final java.lang.Boolean[] getAsBooleanObjectArray() throws java.lang.IllegalArgumentException
Boolean
Object array. NA
is
translated to null
.Boolean
Object array.java.lang.IllegalArgumentException
- if the type of this is not boolean.public double[] getAsDoubleArray() throws java.lang.IllegalArgumentException
NA
is
translated to Double.MIN_VALUE
. Inf
is
translated to Double.POSITIVE_INFINITE
, and -Inf
to
Double.NEGATIVE_INFINITE
.java.lang.IllegalArgumentException
- if the type of this is not double.public double[] getAsDoubleArray(double maskNA) throws java.lang.IllegalArgumentException
NA
is
translated to the passed-in maskNA
. Inf
is
translated to Double.POSITIVE_INFINITE
, and -Inf
to Double.NEGATIVE_INFINITE
.maskNA
- The value that NA is translated to.java.lang.IllegalArgumentException
- if the type of this is not double.public java.lang.Double[] getAsDoubleObjectArray() throws java.lang.IllegalArgumentException
NA
is
translated to null
. Inf
is translated to
Double.POSITIVE_INFINITE
, and -Inf
to
Double.NEGATIVE_INFINITE
.java.lang.IllegalArgumentException
- if the type of this is not double.public final int[] getAsIntegerArray() throws java.lang.IllegalArgumentException
NA
will be translated to Integer.MAX_VALUE-1
. Inf
will be translated to Integer.MAX_VALUE
, -Inf
to Integer.MIN_VALUE
.java.lang.IllegalArgumentException
- if the type of this is not integer.public int[] getAsIntegerArray(int maskNA) throws java.lang.IllegalArgumentException
NA
will be translated to the passed in maskNA
. Inf
will be translated to Integer.MAX_VALUE
, -Inf
to Integer.MIN_VALUE
.maskNA
- the value that NA will be translated to.java.lang.IllegalArgumentException
- if the type of this is not integer.public final java.lang.Integer[] getAsIntegerObjectArray() throws java.lang.IllegalArgumentException
NA
is translated to null
. Inf
is translated to Integer.MAX_VALUE
, and -Inf
to Integer.MIN_VALUE
.java.lang.IllegalArgumentException
- if the type of this is not integer.public final java.lang.String[] getAsStringArray() throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
- if vector type is not integerpublic java.util.List<Attr> getAttrs()
Attr
objects.Attr
public java.util.List<Item> getItems()
Item
objects.Item
public java.lang.Integer getLength()
public java.lang.String getName()
getName
in interface SplusObject
public java.lang.String getType()
public void setAttrs(java.util.List<Attr> attrs)
Attr
objects.attrs
- A list of the vector's attributes.Attr
public void setItems(java.util.List<Item> items)
Item
objects.items
- A list of the vector's items.Item
public void setLength(int len)
len
- The length.public void setName(java.lang.String name)
setName
in interface SplusObject
name
- A string containing the vector's name.public void setType(java.lang.String type)
type
- A string specifying the vector's type.