|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnetcharts.pro.common.NFBaseClass
netcharts.pro.common.NFVector
public class NFVector
NFVector allows for a vector of multidimensional data.
If more than one dimension exists, an Object array with
the appropriate number of columns is put into the vector
element.
The addElement(Object elements[]) method is used only
when you need to add multi-dimensional data to the NFVector,
like in the case of X-Y data points where each data
point is actually a two-dimensional data set. And in
that case, each component of the multi-dimensional set
must exist, even if it's null
.
For single dimension properties, such as bar values, tic
labels, colors in a color table, etc. each element should
be added individually to the NFVector, not as a array. For
example:
NFVector v = new NFVector(); v.addElement("Monday"); v.addElement("Tuesday");NOT
NFVector v = new NFVector(); v.addElement(new String[] {"Monday", "Tuesday"});
Constructor Summary | |
---|---|
NFVector()
Creates an empty NFVector. |
|
NFVector(java.util.Vector initialValues)
Creates an NFVector initially populated from the specified Vector. |
Method Summary | |
---|---|
void |
addElement(java.lang.Object element)
Add the object to the vector. |
void |
addElement(java.lang.Object[] elements)
Add the object array to the vector. |
java.lang.Object |
clone()
Does a deep copy of this NFVector object - if objects in the vector are of type NFBaseClass they will be cloned as well. |
java.lang.Object |
elementAt(int index)
Returns the element at the given index |
java.lang.Object |
elementAt(int row,
int col)
Returns the element at the given row and column index. |
java.lang.String |
getCDL()
Gets the CDL representation of this vector |
void |
getCDL(java.lang.String paramName,
java.lang.StringBuffer sb)
Append CDL parameters representing this NFVector to the given StringBuffer. |
void |
getCDL(java.lang.String paramName,
java.lang.StringBuffer sb,
boolean getIfEmpty)
Append CDL parameters representing this NFVector to the given StringBuffer. |
boolean |
getCDLHasTuples()
Gets the hasTuples property |
void |
getCDLKeyValues(java.lang.String paramName,
java.util.Vector v)
Append CDL parameters representing this NFVector to the given StringBuffer. |
void |
getCDLKeyValuesHasPoints(java.lang.String paramName,
java.util.Vector v)
Append CDL parameters representing this NFVector to the given StringBuffer. |
int |
getMaxDimensions()
Return the maximum number of dimensions in this Vector. |
boolean |
getQuoteStrings()
Returns the quote strings property |
int |
getSize()
Return the number of elements in this NFVector. |
boolean |
isEmptyStringAsNull()
Returns the empty string as null property |
void |
loadDataModel(NFDataModel dataModel)
Loads the vector from the given object implementing the NFDataModel interface. |
void |
loadDataModel(java.lang.Object dataObject,
java.lang.String[] methods,
int nrows)
Loads the vector from the given object implementing the NFDataModel interface. |
void |
loadDataModel(java.lang.Object dataObject,
java.lang.String method,
int nrows)
Loads the vector from the given object implementing the NFDataModel interface. |
void |
removeElementAt(int index)
Remove the object at the given index. |
void |
reset()
Clears any values within the NFVector. |
void |
setCDL(java.lang.Object cdlObject,
java.lang.Class clazz)
Sets the CDL representation of this vector. |
void |
setCDLHasTuples(boolean hasTuples)
Sets the hasTuples property |
void |
setCDLNullString(java.lang.String nullCDLString)
Sets the nullCDLString. |
void |
setElementAt(java.lang.Object element,
int index)
Set the object into the vector. |
void |
setEmptyStringAsNull(boolean emptyStringAsNull)
Sets the empty string as null property |
void |
setQuoteStrings(boolean quoteStrings)
Sets the quote strings property |
void |
setSize(int size)
Set the vector size |
int |
size()
Return the number of elements in this NFVector. |
void |
skipNulls(boolean skipNulls)
When skipNulls is true, null data in the vector will not be passed to the rendering engine. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array containing all of the elements in this Vector in the correct order. |
java.lang.String |
toString()
Returns a new String object representing this vector. |
Methods inherited from class netcharts.pro.common.NFBaseClass |
---|
getModified, getUserObject, setModified, setUserObject |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public NFVector()
public NFVector(java.util.Vector initialValues)
initialValues
- A Vector containing a set of initial valuesMethod Detail |
---|
public java.lang.Object elementAt(int row, int col)
row
- col
-
public java.lang.Object elementAt(int index)
index
-
public void addElement(java.lang.Object element)
element
- Object to addpublic void setElementAt(java.lang.Object element, int index)
element
- object to addindex
- Row index to put the object.public void removeElementAt(int index)
index
- Row index to remove. If the index is greater than
the number of rows in the vector it will just return without error.public void addElement(java.lang.Object[] elements)
elements
- Object array to addpublic void setSize(int size)
size
- Sets the size of the vector. If size
is zero, it will reset the number of dimensions to 1public int getSize()
public int size()
public void reset()
public int getMaxDimensions()
public void setQuoteStrings(boolean quoteStrings)
quoteStrings
- When set to true, when this
object's toString or getCDL method is called, objects of
type String will be delimited with double quotes.public boolean getQuoteStrings()
public boolean isEmptyStringAsNull()
public void setEmptyStringAsNull(boolean emptyStringAsNull)
emptyStringAsNull
- When set to true, empty strings will be
returned as null objectspublic void loadDataModel(NFDataModel dataModel)
dataModel
- The data model object to load from.public void loadDataModel(java.lang.Object dataObject, java.lang.String method, int nrows) throws java.lang.NoSuchMethodException, java.lang.SecurityException
dataObject
- The data model object to load frommethod
- The method to call for each data row foundnrows
- The number of data rows
java.lang.NoSuchMethodException
java.lang.SecurityException
public void loadDataModel(java.lang.Object dataObject, java.lang.String[] methods, int nrows) throws java.lang.NoSuchMethodException, java.lang.SecurityException
dataObject
- The data model object to load frommethods
- The methods to call for each data row foundnrows
- The number of data rows
java.lang.NoSuchMethodException
java.lang.SecurityException
public void skipNulls(boolean skipNulls)
skipNulls
- default is falsepublic void setCDLHasTuples(boolean hasTuples)
hasTuples
- Used to determine parsing for setCDLpublic boolean getCDLHasTuples()
public java.lang.String getCDL()
public void getCDL(java.lang.String paramName, java.lang.StringBuffer sb)
param
- The parameter name to use the basesb
- Target buffer to append the CDL parameterspublic void getCDL(java.lang.String paramName, java.lang.StringBuffer sb, boolean getIfEmpty)
param
- The parameter name to use the basesb
- Target buffer to append the CDL parametersgetIfEmpty
- Whether or not to append the parameter if no values exist within the NFVectorpublic void getCDLKeyValues(java.lang.String paramName, java.util.Vector v)
param
- The parameter name to use the basev
- The Vector to append the parameter definitions topublic void getCDLKeyValuesHasPoints(java.lang.String paramName, java.util.Vector v)
paramName
- The parameter name to use the basev
- The Vector to append the parameter definitions topublic void setCDL(java.lang.Object cdlObject, java.lang.Class clazz)
cdlObject
- Puts the list represented by this
cdl into the vector.clazz
- The Java class that each element
of this vector represents.public java.lang.String toString()
toString
in class java.lang.Object
public void setCDLNullString(java.lang.String nullCDLString)
nullCDLString
- Represents the value to use when
the vector is being converted to a cdl string and an element is null.
Set to "" by default.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class NFBaseClass
java.lang.CloneNotSupportedException
public java.lang.Object[] toArray(java.lang.Object[] a)
If the Vector fits in the specified array with room to spare (i.e., the array has more elements than the Vector), the element in the array immediately following the end of the Vector is set to null. This is useful in determining the length of the Vector only if the caller knows that the Vector does not contain any null elements.
a
- the array into which the elements of the Vector are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose.
java.lang.ArrayStoreException
- the runtime type of a is not a supertype
of the runtime type of every element in this Vector.
|
NetCharts Pro | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Visual Mining, Inc. | Copyright © Visual Mining, Inc. 1996 - 2011 |
Last Modified: Jun 28, 2011 |