com.google.visualization.datasource.query
Class GenericColumnLookup

java.lang.Object
  extended by com.google.visualization.datasource.query.GenericColumnLookup
All Implemented Interfaces:
ColumnLookup

public class GenericColumnLookup
extends java.lang.Object
implements ColumnLookup

This class represents a generic column lookup. It maps an abstract column to its index in a table description.

Author:
Liron L.

Constructor Summary
GenericColumnLookup()
          Create a GenericColumnLookup (with an empty map).
 
Method Summary
 void clear()
          Clear all data of this GenericColumnLookup.
 boolean containsColumn(AbstractColumn column)
          Returns whether or not this ColumnLookup contains the given column.
 int getColumnIndex(AbstractColumn column)
          Returns the column index in the columns of a row (first is zero).
 void put(AbstractColumn col, int index)
          Sets the index of the given column to the given number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericColumnLookup

public GenericColumnLookup()
Create a GenericColumnLookup (with an empty map).

Method Detail

clear

public void clear()
Clear all data of this GenericColumnLookup.


put

public void put(AbstractColumn col,
                int index)
Sets the index of the given column to the given number.

Parameters:
col - The column to set the index of.
index - The index to set for the column.

getColumnIndex

public int getColumnIndex(AbstractColumn column)
Returns the column index in the columns of a row (first is zero).

Specified by:
getColumnIndex in interface ColumnLookup
Parameters:
column - The column.
Returns:
The column index in the columns of a row (first is zero).

containsColumn

public boolean containsColumn(AbstractColumn column)
Description copied from interface: ColumnLookup
Returns whether or not this ColumnLookup contains the given column.

Specified by:
containsColumn in interface ColumnLookup
Parameters:
column - The column to check.
Returns:
True if column exists, false otherwise.


Copyright © 2009 Google. All Rights Reserved.