|
||||||||||
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 infovis.column.LiteralColumn
public abstract class LiteralColumn
Abstract class for all columns containing literal values.
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 | |
---|---|
LiteralColumn(String name)
Constructor for LiteralColumn. |
Method Summary | |
---|---|
void |
clear()
Removes all of the elements from this column. |
int |
compare(int row1,
int row2)
|
boolean |
compareValues(Column c)
Compare the values of this column and the specified column. |
abstract 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 |
int |
getIntAt(int row)
Returns the value as an int |
long |
getLongAt(int row)
Returns the value as a long |
static NumberColumn |
getNumberColumn(Table t,
int index)
Returns a column as a NumberColumn from an
Table . |
boolean |
hasUndefinedValue()
Returns true if the columns contains
undefined values, false otherwise. |
boolean |
isValueUndefined(int i)
Returns true if the ith value is undefined. |
double |
round(double value)
Returns the rounded value according to the semantics of this number value. |
abstract 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 |
setIntAt(int row,
int v)
Sets the value as an int |
void |
setLongAt(int row,
long v)
Sets the value as a long |
void |
setSize(int newSize)
Sets the sizeColumn of this column. |
void |
setValueUndefined(int i,
boolean undef)
Sets the ith element to have an undefined value. |
void |
trimUndefined()
Removes all the undefined values at the end of the column |
Methods inherited from class infovis.column.BasicColumn |
---|
addValue, addValueOrNull, firstValidRow, getClientProperty, getFormat, getMaxIndex, getMetadata, getMinIndex, getName, getValueClass, isEmpty, isInternal, iterator, lastValidRow, setFormat, setName, setValueOrNullAt, toString |
Methods inherited from class infovis.column.AbstractColumn |
---|
addChangeListener, 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.NumberColumn |
---|
format |
Methods inherited from interface infovis.Column |
---|
addChangeListener, addValue, addValueOrNull, capacity, disableNotify, enableNotify, ensureCapacity, getFormat, getMaxIndex, getMinIndex, getName, getValueAt, getValueClass, isEmpty, isInternal, iterator, removeChangeListener, setFormat, setName, setValueAt, setValueOrNullAt, size |
Methods inherited from interface infovis.Metadata |
---|
getClientProperty, getMetadata |
Methods inherited from interface cern.colt.function.IntComparator |
---|
equals |
Constructor Detail |
---|
public LiteralColumn(String name)
name
- Method Detail |
---|
public void clear()
BasicColumn
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
clear
in class BasicColumn
Call clear after clearing the subclass contents since this method fires
the notifications.
public boolean compareValues(Column c)
AbstractColumn
compareValues
in class AbstractColumn
c
- the column to compare values from
true
if the values match, false
otherwisepublic boolean isValueUndefined(int i)
Column
isValueUndefined
in interface Column
isValueUndefined
in interface RowComparator
i
- the index
Column.isValueUndefined(int)
public void setValueUndefined(int i, boolean undef)
Column
setValueUndefined
in interface Column
i
- the indexundef
- true if the value should be undefined,
false otherwise.Column.setValueUndefined(int,boolean)
public void setSize(int newSize)
BasicColumn
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.
setSize
in interface Column
setSize
in class BasicColumn
newSize
- the new sizeColumn of this column.public void trimUndefined()
public int getIntAt(int row)
getIntAt
in interface NumberColumn
row
- the row
public float getFloatAt(int row)
getFloatAt
in interface NumberColumn
row
- the row
public long getLongAt(int row)
getLongAt
in interface NumberColumn
row
- the row
public abstract double getDoubleAt(int row)
getDoubleAt
in interface NumberColumn
row
- the row
public void setIntAt(int row, int v)
setIntAt
in interface NumberColumn
row
- the rowv
- the value as an intpublic void setFloatAt(int row, float v)
setFloatAt
in interface NumberColumn
row
- the rowv
- the value as a floatpublic void setLongAt(int row, long v)
setLongAt
in interface NumberColumn
row
- the rowv
- the value as a longpublic abstract void setDoubleAt(int row, double v)
setDoubleAt
in interface NumberColumn
row
- the rowv
- the value as a doublepublic static NumberColumn getNumberColumn(Table t, int index)
NumberColumn
from an
Table
.
t
- the Table
index
- index in the Table
NumberColumn
or null if no such column exists or
the column is not a NumberColumn
.public int compare(int row1, int row2)
BasicColumn
compare
in interface IntComparator
compare
in class BasicColumn
IntComparator.compare(int,int)
public boolean hasUndefinedValue()
Column
true
if the columns contains
undefined values, false
otherwise.
hasUndefinedValue
in interface Column
true
if the columns contains
undefined values, false
otherwise.public double round(double value)
NumberColumn
round
in interface NumberColumn
value
- the value to round
public double getDoubleMin()
NumberColumn
getDoubleMin
in interface NumberColumn
public double getDoubleMax()
NumberColumn
getDoubleMax
in interface NumberColumn
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |