|
||||||||||
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.ColumnProxy
public class ColumnProxy
Column forwarding all its methods to a backing column.
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 | |
---|---|
ColumnProxy(Column column)
Creates a ColumnProxy. |
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. |
int |
capacity()
Returns the current capacity of this column. |
void |
clear()
Removes all of the elements from this column. |
int |
compare(int row1,
int row2)
|
void |
dispose()
Releases all the resources maintained by this proxy column. |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this column, if necessary, to ensure that it can hold at least the number of values specified by the minimum capacity argument. |
MutableAttributeSet |
getClientProperty()
Returns a MutableAttributeSet associating keys to values holding user-supplied data. |
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 MutableAttributeSet associating keys to values for qualifying the data contained in the instance of this interface. |
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 column name. |
String |
getValueAt(int index)
Returns the String representation of the element at the specified position in this column or null if
the element is undefined. |
Class |
getValueClass()
Returns the class of the elements. |
boolean |
hasUndefinedValue()
Returns true if the columns contains
undefined values, false otherwise. |
boolean |
isEmpty()
Returns true if this column contains no elements. |
boolean |
isInternal()
Returns true if the column name starts with a '#'. |
boolean |
isValueUndefined(int row)
Returns true if the ith value is undefined. |
RowIterator |
iterator()
Returns a RowIterator over all the valid rows of this column. |
void |
setFormat(Format format)
Sets the format. |
void |
setName(String name)
Sets the column name. |
void |
setSize(int newSize)
Sets the size of this column. |
void |
setValueAt(int index,
String element)
Replaces the element at the specified position in this column with the element specified in its String representation or sets if undefined if the element is null
It will be read and translated using the Format. |
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. |
void |
setValueUndefined(int i,
boolean undef)
Sets the ith element to have an undefined value. |
int |
size()
Returns the number of elements in this column. |
void |
stateChanged(ChangeEvent e)
|
Methods inherited from class infovis.column.AbstractColumn |
---|
addChangeListener, compareValues, computeValueMap, computeValueMap, equalObj, equals, getLastModifiedRow, toString |
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 |
---|
disableNotify, enableNotify, removeChangeListener |
Constructor Detail |
---|
public ColumnProxy(Column column)
column
- the backing column.Method Detail |
---|
public void dispose()
public void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
public void addValue(String v) throws ParseException
col.addValue(a)
is equivalent to
col.setValueAt(col.size(), a)
.
addValue
in interface Column
v
- element to be appended to this column.
ParseException
- if the specified string
cannot be parsed.public boolean addValueOrNull(String v)
col.addValueOrNull(a)
is equivalent to
col.setValueAtOrNull(col.size(), a)
.
addValueOrNull
in interface Column
v
- element to be appended to this column.
public int capacity()
capacity
in interface Column
public void clear()
CategoricalFormat
, it
is not cleared so results may not be what you expected. The
CategoricalFormat
can be cleared explicitely if
needed.
clear
in interface Column
public int compare(int row1, int row2)
compare
in interface IntComparator
public void ensureCapacity(int minCapacity)
ensureCapacity
in interface Column
minCapacity
- the desired minimum capacity.public MutableAttributeSet getClientProperty()
getClientProperty
in interface Metadata
public Format getFormat()
getFormat
in interface Column
public MutableAttributeSet getMetadata()
getMetadata
in interface Metadata
public String getName()
getName
in interface Column
public int size()
size
in interface Column
public void setSize(int newSize)
Some column will ignore this request.
setSize
in interface Column
newSize
- the new size.public String getValueAt(int index)
null
if
the element is undefined. The representation is
generated by the current format.
getValueAt
in interface Column
index
- index of element representation to return.
null
if the element is undefined.public Class getValueClass()
getValueClass
in interface Column
public boolean isEmpty()
isEmpty
in interface Column
public boolean isInternal()
isInternal
in interface Column
public boolean isValueUndefined(int row)
isValueUndefined
in interface Column
isValueUndefined
in interface RowComparator
row
- the index
public RowIterator iterator()
iterator
in interface Column
public void setFormat(Format format)
setFormat
in interface Column
format
- The format to setpublic void setName(String name)
setName
in interface Column
name
- The name to setpublic void setValueAt(int index, String element) throws ParseException
null
It will be read and translated using the Format. A null value
sets the value to undefined. The column is extended if
needed.
setValueAt
in interface Column
index
- index of element to replace.element
- element to be stored at the specified position.
ParseException
- if the specified string cannot be parsed.public boolean setValueOrNullAt(int index, String v)
setValueOrNullAt
in interface Column
index
- index of element to setv
- element to be appended to this column.
public void setValueUndefined(int i, boolean undef)
setValueUndefined
in interface Column
i
- the indexundef
- true if the value should be undefined,
false otherwise.public int getMaxIndex()
getMaxIndex
in interface Column
public int getMinIndex()
getMinIndex
in interface Column
public boolean hasUndefinedValue()
true
if the columns contains
undefined values, false
otherwise.
hasUndefinedValue
in interface Column
true
if the columns contains
undefined values, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |