|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.column.ConstantColumn infovis.column.IdColumn
public class IdColumn
Class IdColumn
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 | |
---|---|
IdColumn()
|
|
IdColumn(int size)
|
Method Summary | |
---|---|
int |
compare(int row1,
int row2)
|
String |
format(int v)
Returns the string representation of a value according to the current format. |
int |
get(int row)
|
double |
getDoubleAt(int row)
Returns the value as a double. |
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. |
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. |
int |
getSize()
|
Class |
getValueClass()
Returns the class of the elements. |
boolean |
hasUndefinedValue()
Returns true if the columns contains
undefined values, false otherwise. |
boolean |
isValueUndefined(int i)
Returns true if the ith value is undefined. |
int |
lastValidRow()
|
int |
parse(String v)
Parse a string and return the value for the column. |
double |
round(double value)
Returns the rounded value according to the semantics of this number value. |
void |
set(int row)
|
void |
setSize(int i)
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. |
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 infovis.column.ConstantColumn |
---|
addChangeListener, addValue, addValueOrNull, capacity, clear, disableNotify, enableNotify, ensureCapacity, format, getClientProperty, getDoubleMax, getDoubleMin, getFloatAt, getFormat, getIntAt, getLongAt, getMetadata, getValueAt, isEmpty, isInternal, iterator, removeChangeListener, setDoubleAt, setFloatAt, setFormat, setIntAt, setLongAt, setName, setValueOrNullAt |
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 IdColumn(int size)
public IdColumn()
Method Detail |
---|
public String getName()
ConstantColumn
getName
in interface Column
getName
in class ConstantColumn
public int getMinIndex()
ConstantColumn
getMinIndex
in interface Column
getMinIndex
in class ConstantColumn
public int getMaxIndex()
ConstantColumn
getMaxIndex
in interface Column
getMaxIndex
in class ConstantColumn
public int get(int row)
public void set(int row)
public double getDoubleAt(int row)
ConstantColumn
getDoubleAt
in interface NumberColumn
getDoubleAt
in class ConstantColumn
row
- the row
public double round(double value)
ConstantColumn
round
in interface NumberColumn
round
in class ConstantColumn
value
- the value to round
public int parse(String v) throws ParseException
v
- the string representation of the value
ParseException
- if the value cannot be parsedpublic String format(int v)
v
- the value
public int size()
ConstantColumn
size
in interface Column
size
in class ConstantColumn
public boolean hasUndefinedValue()
ConstantColumn
true
if the columns contains
undefined values, false
otherwise.
hasUndefinedValue
in interface Column
hasUndefinedValue
in class ConstantColumn
true
if the columns contains
undefined values, false
otherwise.public Class getValueClass()
ConstantColumn
getValueClass
in interface Column
getValueClass
in class ConstantColumn
public boolean isValueUndefined(int i)
ConstantColumn
isValueUndefined
in interface Column
isValueUndefined
in interface RowComparator
isValueUndefined
in class ConstantColumn
i
- the index
public int lastValidRow()
public void setValueAt(int index, String element) throws ParseException
ConstantColumn
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
setValueAt
in class ConstantColumn
index
- index of element to replace.element
- element to be stored at the specified position.
ParseException
- if the specified string cannot be parsed.public void setValueUndefined(int i, boolean undef)
ConstantColumn
setValueUndefined
in interface Column
setValueUndefined
in class ConstantColumn
i
- the indexundef
- true if the value should be undefined,
false otherwise.public int compare(int row1, int row2)
ConstantColumn
compare
in interface IntComparator
compare
in class ConstantColumn
public int getSize()
public void setSize(int i)
ConstantColumn
Some column will ignore this request.
setSize
in interface Column
setSize
in class ConstantColumn
i
- the new size.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |