pl.edu.agh.cast.importer.base.data
Class DataRow

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList<Object>
                  extended by pl.edu.agh.cast.importer.base.data.DataRow
All Implemented Interfaces:
Serializable, Cloneable, Iterable<Object>, Collection<Object>, Deque<Object>, List<Object>, Queue<Object>, IDataRow<Object>, IImportDataMonitorable

public class DataRow
extends LinkedList<Object>
implements IDataRow<Object>, IImportDataMonitorable

Class, which represents one analyzed row of data read from the source data file. It extends LinkedList of Objects, which each represents one analyzed cell.

Author:
AGH CAST Team
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DataRow(DataRow row, TabularData data)
          The copying constructor.
DataRow(int inpRowNum, TabularData data)
          The default constructor.
 
Method Summary
 boolean equals(Object obj)
          
 int getInputColumnRef(int colIdx)
          Retrieves the reference to the input column for the specified column index.
 int getInputRowNumber()
          Retrieves the input row number.
 List<IImportDataObserver> getObservers()
          Retrieves the list of all registered observers.
 int hashCode()
          
 void registerObserver(IImportDataObserver observer)
          Registers a new observer.
 Object set(int index, Object newValue)
          
 String toString()
          
 void unregisterObserver(IImportDataObserver observer)
          Unregisters an existing observer.
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, descendingIterator, element, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, offer, offerFirst, offerLast, peek, peekFirst, peekLast, poll, pollFirst, pollLast, pop, push, remove, remove, remove, removeFirst, removeFirstOccurrence, removeLast, removeLastOccurrence, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, get, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, size, subList, toArray, toArray
 
Methods inherited from interface java.util.Deque
iterator
 

Constructor Detail

DataRow

public DataRow(int inpRowNum,
               TabularData data)
The default constructor.

Parameters:
inpRowNum - the row number from the input file
data - the tabular data, within which the current data row is contained

DataRow

public DataRow(DataRow row,
               TabularData data)
The copying constructor. Constructs a data row containing all the columns of the specified data, in the order they are returned by the specified data row's iterator. It also sets the new data row as content of a specified tabular data.

Parameters:
row - the data row to copy the columns from
data - the tabular data, within which the current data row is contained
Method Detail

registerObserver

public void registerObserver(IImportDataObserver observer)
Registers a new observer. If the specified observer is already registered it is not added again.

Specified by:
registerObserver in interface IImportDataMonitorable
Parameters:
observer - the observer to register
See Also:
IImportDataMonitorable.registerObserver( pl.edu.agh.cast.importer.base.logging.IImportDataObserver)

unregisterObserver

public void unregisterObserver(IImportDataObserver observer)
Unregisters an existing observer. The method ignores unregistered observers.

Specified by:
unregisterObserver in interface IImportDataMonitorable
Parameters:
observer - the observer to unregister
See Also:
IImportDataMonitorable.unregisterObserver( pl.edu.agh.cast.importer.base.logging.IImportDataObserver)

getObservers

public List<IImportDataObserver> getObservers()
Retrieves the list of all registered observers.

Specified by:
getObservers in interface IImportDataMonitorable
Returns:
the registered observers
See Also:
IImportDataMonitorable.getObservers()

set

public Object set(int index,
                  Object newValue)

Specified by:
set in interface List<Object>
Overrides:
set in class LinkedList<Object>
See Also:
LinkedList.set(int, java.lang.Object)

equals

public boolean equals(Object obj)

Specified by:
equals in interface Collection<Object>
Specified by:
equals in interface List<Object>
Overrides:
equals in class AbstractList<Object>
See Also:
AbstractList.equals(java.lang.Object)

hashCode

public int hashCode()

Specified by:
hashCode in interface Collection<Object>
Specified by:
hashCode in interface List<Object>
Overrides:
hashCode in class AbstractList<Object>
See Also:
AbstractList.hashCode()

toString

public String toString()

Overrides:
toString in class AbstractCollection<Object>
See Also:
Object.toString()

getInputRowNumber

public int getInputRowNumber()
Retrieves the input row number.

Specified by:
getInputRowNumber in interface IDataRow<Object>
Returns:
row number
See Also:
IDataRow.getInputRowNumber()

getInputColumnRef

public int getInputColumnRef(int colIdx)
Retrieves the reference to the input column for the specified column index.

Parameters:
colIdx - the column index to retrieve the input reference to
Returns:
the reference to the input column


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.