infovis.column
Class AbstractColumn

java.lang.Object
  extended by infovis.utils.ChangeManager
      extended by infovis.column.AbstractColumn
All Implemented Interfaces:
IntComparator, Column, Metadata, Constants, RowComparator, Serializable
Direct Known Subclasses:
BasicColumn, ColumnProxy

public abstract class AbstractColumn
extends ChangeManager
implements Column

AbstractColumn is the base class for each concrete column.

AbstractColumn implements the notification mechanism and its inhibition.

Version:
$Revision: 1.24 $
Author:
Jean-Daniel Fekete
See Also:
Serialized Form

Field Summary
static int MODIFIED_ALL
          Value of lastModifiedRow when more than one row has been modified.
static int MODIFIED_NONE
          Value of lastModifiedRow when no row has been modified.
 
Fields inherited from interface infovis.metadata.Constants
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE
 
Constructor Summary
AbstractColumn()
           
 
Method Summary
 void addChangeListener(ChangeListener listener)
          Adds a ChangeListener to call when this column is modified.
 boolean compareValues(Column c)
          Compare the values of this column and the specified column.
 IntIntSortedMap computeValueMap()
          Returns the list of uniq elements of this columns associated with their count.
 IntIntSortedMap computeValueMap(RowComparator comp)
          Returns the list of uniq elements of this columns associated with their count.
static boolean equalObj(Object o1, Object o2)
          Compare two objects that can be null.
 boolean equals(Object obj)
          
 int getLastModifiedRow()
          Return the last modified row.
 String 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
addValue, addValueOrNull, capacity, clear, disableNotify, enableNotify, ensureCapacity, getFormat, getMaxIndex, getMinIndex, getName, getValueAt, getValueClass, hasUndefinedValue, isEmpty, isInternal, isValueUndefined, iterator, removeChangeListener, setFormat, setName, setSize, setValueAt, setValueOrNullAt, setValueUndefined, size
 
Methods inherited from interface infovis.Metadata
getClientProperty, getMetadata
 
Methods inherited from interface cern.colt.function.IntComparator
compare
 

Field Detail

MODIFIED_ALL

public static final int MODIFIED_ALL
Value of lastModifiedRow when more than one row has been modified.

See Also:
Constant Field Values

MODIFIED_NONE

public static final int MODIFIED_NONE
Value of lastModifiedRow when no row has been modified.

See Also:
Constant Field Values
Constructor Detail

AbstractColumn

public AbstractColumn()
Method Detail

getLastModifiedRow

public int getLastModifiedRow()
Return the last modified row.

Returns:
the last modified row

equalObj

public static boolean equalObj(Object o1,
                               Object o2)
Compare two objects that can be null.

Parameters:
o1 - first object
o2 - second object
Returns:
true if both object have the same value or are equal.

equals

public boolean equals(Object obj)

Specified by:
equals in interface IntComparator
Overrides:
equals in class Object

compareValues

public boolean compareValues(Column c)
Compare the values of this column and the specified column.

Parameters:
c - the column to compare values from
Returns:
true if the values match, false otherwise

addChangeListener

public void addChangeListener(ChangeListener listener)
Adds a ChangeListener to call when this column is modified.

Specified by:
addChangeListener in interface Column
Overrides:
addChangeListener in class ChangeManager
Parameters:
listener - the listener to add

toString

public String toString()

Overrides:
toString in class Object

computeValueMap

public IntIntSortedMap computeValueMap(RowComparator comp)
Returns the list of uniq elements of this columns associated with their count.

The list contains tuples: the index of a representative of the value and the number of repetition of this value.

Parameters:
comp - a comparator used to order the value or null if it should appear in the order specified by the column.
Returns:
a IntIntSortedMap that can be read using an iterator.

computeValueMap

public IntIntSortedMap computeValueMap()
Returns the list of uniq elements of this columns associated with their count.

The list contains tuples: the index of a representative of the value and the number of repetition of this value.

Returns:
a IntIntSortedMap that can be read using an iterator.


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.