|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.utils.ChangeManager infovis.column.AbstractColumn infovis.column.BasicColumn
public abstract class BasicColumn
BasicColumn implements the management of name, Metadata, clientProperty and Format. It also implements generically the copyFrom method.
Field Summary |
---|
Fields inherited from class infovis.column.AbstractColumn |
---|
MODIFIED_ALL, MODIFIED_NONE |
Fields inherited from interface infovis.metadata.Constants |
---|
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE |
Constructor Summary | |
---|---|
BasicColumn(String name)
Constructor for Column. |
Method Summary | |
---|---|
void |
addValue(String v)
Appends the element specified in its String representation to the end of this column. |
boolean |
addValueOrNull(String v)
Appends the element specified in its String representation to the end of this column or adds an undefined object if the String cannot be parsed. |
void |
clear()
Removes all of the elements from this column. |
int |
compare(int row1,
int row2)
|
int |
firstValidRow()
Returns the index of the first row which has a defined value or Integer.MAX_VALUE if there is none. |
MutableAttributeSet |
getClientProperty()
Returns the clientPropery. |
Format |
getFormat()
Returns the format. |
int |
getMaxIndex()
Returns an the index of a row containing the maximum value of this column or -1 if the column has only undefined values or is empty. |
MutableAttributeSet |
getMetadata()
Returns the metadata. |
int |
getMinIndex()
Returns an the index of a row containing the minimum value of this column or -1 if the column has only undefined values or is empty. |
String |
getName()
Returns the name. |
abstract Class |
getValueClass()
Returns the class of the elements. |
boolean |
isEmpty()
Returns true if this column contains no elements. |
boolean |
isInternal()
Returns true if the column name starts with a '#'. |
RowIterator |
iterator()
Returns a RowIterator over all the valid rows of this column. |
int |
lastValidRow()
Returns the index of the last row which has a defined value or -1 if there is none. |
void |
setFormat(Format format)
Sets the format. |
void |
setName(String name)
Sets the name. |
abstract void |
setSize(int newSize)
Sets the sizeColumn of this column. |
boolean |
setValueOrNullAt(int index,
String v)
Replaces the element at the specified position in this column with the element specified in its String representation or set it undefined if the String cannot be parsed. |
String |
toString()
|
Methods inherited from class infovis.column.AbstractColumn |
---|
addChangeListener, compareValues, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow |
Methods inherited from class infovis.utils.ChangeManager |
---|
disableNotify, enableNotify, getModCount, removeChangeListener |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface infovis.Column |
---|
capacity, disableNotify, enableNotify, ensureCapacity, getValueAt, hasUndefinedValue, isValueUndefined, removeChangeListener, setValueAt, setValueUndefined, size |
Constructor Detail |
---|
public BasicColumn(String name)
name
- the column nameMethod Detail |
---|
public void clear()
CategoricalFormat
, it
is not cleared so results may not be what you expected. The
CategoricalFormat
can be cleared explicitely if
needed.
public String getName()
public void setName(String name)
name
- The name to setpublic boolean isInternal()
public MutableAttributeSet getClientProperty()
public MutableAttributeSet getMetadata()
public Format getFormat()
public void setFormat(Format format)
format
- The format to setpublic boolean isEmpty()
public abstract void setSize(int newSize)
0
items
are added to the end of the column. If the new sizeColumn is
less than the current sizeColumn, all components at index
newSize
and greater are discarded.
newSize
- the new sizeColumn of this column.public final void addValue(String v) throws ParseException
col.addValue(a)
is equivalent to
col.setValueAt(col.size(), a)
.
v
- element to be appended to this column.
ParseException
- if the specified string
cannot be parsed.public boolean setValueOrNullAt(int index, String v)
index
- index of element to setv
- element to be appended to this column.
public boolean addValueOrNull(String v)
col.addValueOrNull(a)
is equivalent to
col.setValueAtOrNull(col.size(), a)
.
v
- element to be appended to this column.
public abstract Class getValueClass()
public int firstValidRow()
public int lastValidRow()
public int compare(int row1, int row2)
public RowIterator iterator()
public String toString()
toString
in class AbstractColumn
public int getMinIndex()
public int getMaxIndex()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |