com.netflix.astyanax.thrift.model
Class ThriftCounterColumnListImpl<C>

java.lang.Object
  extended by com.netflix.astyanax.thrift.model.ThriftCounterColumnListImpl<C>
All Implemented Interfaces:
ColumnList<C>, Iterable<Column<C>>

public class ThriftCounterColumnListImpl<C>
extends Object
implements ColumnList<C>


Constructor Summary
ThriftCounterColumnListImpl(List<org.apache.cassandra.thrift.CounterColumn> columns, Serializer<C> colSer)
           
 
Method Summary
 Column<C> getColumnByIndex(int idx)
          Queries column by index
 Column<C> getColumnByName(C columnName)
          Queries column by name
<C2> Column<C2>
getSuperColumn(C columnName, Serializer<C2> colSer)
          Return the super column with the specified name
<C2> Column<C2>
getSuperColumn(int idx, Serializer<C2> colSer)
          Get super column by index
 boolean isEmpty()
          Indicates if the list of columns is empty
 boolean isSuperColumn()
          Returns true if the columns are super columns with subcolumns.
 Iterator<Column<C>> iterator()
           
 int size()
          returns the number of columns in the row
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThriftCounterColumnListImpl

public ThriftCounterColumnListImpl(List<org.apache.cassandra.thrift.CounterColumn> columns,
                                   Serializer<C> colSer)
Method Detail

iterator

public Iterator<Column<C>> iterator()
Specified by:
iterator in interface Iterable<Column<C>>

getColumnByName

public Column<C> getColumnByName(C columnName)
Description copied from interface: ColumnList
Queries column by name

Specified by:
getColumnByName in interface ColumnList<C>
Returns:
an instance of a column or null if not found

getColumnByIndex

public Column<C> getColumnByIndex(int idx)
Description copied from interface: ColumnList
Queries column by index

Specified by:
getColumnByIndex in interface ColumnList<C>
Returns:

getSuperColumn

public <C2> Column<C2> getSuperColumn(C columnName,
                                      Serializer<C2> colSer)
Description copied from interface: ColumnList
Return the super column with the specified name

Specified by:
getSuperColumn in interface ColumnList<C>
Returns:

getSuperColumn

public <C2> Column<C2> getSuperColumn(int idx,
                                      Serializer<C2> colSer)
Description copied from interface: ColumnList
Get super column by index

Specified by:
getSuperColumn in interface ColumnList<C>
Returns:

isEmpty

public boolean isEmpty()
Description copied from interface: ColumnList
Indicates if the list of columns is empty

Specified by:
isEmpty in interface ColumnList<C>
Returns:

size

public int size()
Description copied from interface: ColumnList
returns the number of columns in the row

Specified by:
size in interface ColumnList<C>
Returns:

isSuperColumn

public boolean isSuperColumn()
Description copied from interface: ColumnList
Returns true if the columns are super columns with subcolumns. If true then use getSuperColumn to call children. Otherwise call getColumnByIndex and getColumnByName to get the standard columns in the list.

Specified by:
isSuperColumn in interface ColumnList<C>
Returns:


Copyright © 2012. All Rights Reserved.