|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfovis.column.ConstantColumn
public class ConstantColumn
Column containing constant values for each rows.
| Field Summary |
|---|
| Fields inherited from interface infovis.metadata.Constants |
|---|
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE |
| Constructor Summary | |
|---|---|
ConstantColumn()
|
|
| Method Summary | |
|---|---|
void |
addChangeListener(ChangeListener listener)
Adds a listener to the list that's notified each time a change occurs. |
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 arg0,
int arg1)
|
void |
disableNotify()
Disables notification until enableNotify has been called. |
void |
enableNotify()
Re enable notifications, triggering eventListeners if modifications occur. |
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. |
String |
format(double value)
Returns the specified value formatted according to this column's format. |
MutableAttributeSet |
getClientProperty()
Returns a MutableAttributeSet associating keys to values holding user-supplied data. |
double |
getDoubleAt(int row)
Returns the value as a double. |
double |
getDoubleMax()
Returns the largset value as a double. |
double |
getDoubleMin()
Returns the smallest value as a double. |
float |
getFloatAt(int row)
Returns the value as a float. |
Format |
getFormat()
Returns the format. |
int |
getIntAt(int row)
Returns the value as an int. |
long |
getLongAt(int row)
Returns the value as a long. |
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 i)
Returns true if the ith value is undefined. |
RowIterator |
iterator()
Returns a RowIterator over all the valid rows of this column. |
void |
removeChangeListener(ChangeListener listener)
Removes a listener from the list that's notified each time a change occurs. |
double |
round(double value)
Returns the rounded value according to the semantics of this number value. |
void |
setDoubleAt(int row,
double v)
Sets the value as a double. |
void |
setFloatAt(int row,
float v)
Sets the value as a float. |
void |
setFormat(Format format)
Sets the format. |
void |
setIntAt(int row,
int v)
Sets the value as an int. |
void |
setLongAt(int row,
long v)
Sets the value as a long. |
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. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface cern.colt.function.IntComparator |
|---|
equals |
| Constructor Detail |
|---|
public ConstantColumn()
| Method Detail |
|---|
public int getIntAt(int row)
getIntAt in interface NumberColumnrow - the row
public float getFloatAt(int row)
getFloatAt in interface NumberColumnrow - the row
public long getLongAt(int row)
getLongAt in interface NumberColumnrow - the row
public double getDoubleAt(int row)
getDoubleAt in interface NumberColumnrow - the row
public void setIntAt(int row,
int v)
setIntAt in interface NumberColumnrow - the rowv - the value as an int
public void setFloatAt(int row,
float v)
setFloatAt in interface NumberColumnrow - the rowv - the value as a float
public void setLongAt(int row,
long v)
setLongAt in interface NumberColumnrow - the rowv - the value as a long
public void setDoubleAt(int row,
double v)
setDoubleAt in interface NumberColumnrow - the rowv - the value as a doublepublic double getDoubleMin()
getDoubleMin in interface NumberColumnpublic double getDoubleMax()
getDoubleMax in interface NumberColumnpublic double round(double value)
round in interface NumberColumnvalue - the value to round
public String format(double value)
format in interface NumberColumnvalue - the value to format
public String getName()
getName in interface Columnpublic void setName(String name)
setName in interface Columnname - The name to setpublic boolean isInternal()
isInternal in interface Columnpublic boolean isValueUndefined(int i)
isValueUndefined in interface ColumnisValueUndefined in interface RowComparatori - the index
public void setValueUndefined(int i,
boolean undef)
setValueUndefined in interface Columni - the indexundef - true if the value should be undefined,
false otherwise.public boolean hasUndefinedValue()
true if the columns contains
undefined values, false otherwise.
hasUndefinedValue in interface Columntrue if the columns contains
undefined values, false otherwise.public Format getFormat()
getFormat in interface Columnpublic void setFormat(Format format)
setFormat in interface Columnformat - The format to setpublic boolean isEmpty()
isEmpty in interface Columnpublic int size()
size in interface Columnpublic void setSize(int newSize)
Some column will ignore this request.
setSize in interface ColumnnewSize - the new size.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 Columnpublic void ensureCapacity(int minCapacity)
ensureCapacity in interface ColumnminCapacity - the desired minimum capacity.public int capacity()
capacity in interface Columnpublic String getValueAt(int index)
null if
the element is undefined. The representation is
generated by the current format.
getValueAt in interface Columnindex - index of element representation to return.
null if the element is undefined.
public 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 Columnindex - 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 Columnindex - index of element to setv - element to be appended to this column.
public void addValue(String v)
throws ParseException
col.addValue(a) is equivalent to
col.setValueAt(col.size(), a).
addValue in interface Columnv - 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 Columnv - element to be appended to this column.
public int getMinIndex()
getMinIndex in interface Columnpublic int getMaxIndex()
getMaxIndex in interface Columnpublic Class getValueClass()
getValueClass in interface Columnpublic void disableNotify()
This method is useful if a large number of modifications is going to happen on the column and notifying each time would be too time consuming. The notification will be deferred until enableNotify is called.
Calls to disableNotify can be nested
disableNotify in interface ColumnColumn.enableNotify()public void enableNotify()
enableNotify in interface ColumnColumn.disableNotify()public void addChangeListener(ChangeListener listener)
addChangeListener in interface Columnlistener - the listenerpublic void removeChangeListener(ChangeListener listener)
removeChangeListener in interface Columnlistener - the listenerpublic RowIterator iterator()
iterator in interface Columnpublic MutableAttributeSet getMetadata()
getMetadata in interface Metadatapublic MutableAttributeSet getClientProperty()
getClientProperty in interface Metadata
public int compare(int arg0,
int arg1)
compare in interface IntComparator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||