org.joda.beans.ser
Class SerIterable

java.lang.Object
  extended by org.joda.beans.ser.SerIterable

public abstract class SerIterable
extends Object

An abstraction over collections, lists, sets and maps.

This is a plugin point that can handle Guava collections.


Constructor Summary
SerIterable()
           
 
Method Summary
abstract  void add(Object key, Object column, Object value, int count)
          Adds an item to the builder.
abstract  Object build()
          Builds the final collection.
 SerCategory category()
          Gets the category of iterable.
 Class<?> columnType()
          Gets the type of the column.
 void dimensions(int[] dimensions)
          Sets the dimensions of the wrapped collection.
abstract  SerIterator iterator()
          Obtains an iterator over the data.
 Class<?> keyType()
          Gets the type of the key.
abstract  Class<?> valueType()
          Gets the type of the value.
abstract  List<Class<?>> valueTypeTypes()
          Gets the generic parameters of the value type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerIterable

public SerIterable()
Method Detail

iterator

public abstract SerIterator iterator()
Obtains an iterator over the data.

Returns:
the iterator, not null

dimensions

public void dimensions(int[] dimensions)
Sets the dimensions of the wrapped collection.

Parameters:
dimensions - the dimension, 0 for row, 1 for column

add

public abstract void add(Object key,
                         Object column,
                         Object value,
                         int count)
Adds an item to the builder.

Parameters:
key - the key, such as for a map, null if no key
column - the column, such as for a table, null if no column
value - the value, such as for a map or list value, may be null
count - the count, such as for a multiset, typically one or greater

build

public abstract Object build()
Builds the final collection.

Returns:
the build collection, not null

category

public SerCategory category()
Gets the category of iterable.

Returns:
the category, not null

keyType

public Class<?> keyType()
Gets the type of the key.

Returns:
the key type, null if no key

columnType

public Class<?> columnType()
Gets the type of the column.

Returns:
the column type, null if no column

valueType

public abstract Class<?> valueType()
Gets the type of the value.

Returns:
the value type, not null

valueTypeTypes

public abstract List<Class<?>> valueTypeTypes()
Gets the generic parameters of the value type.

Returns:
the generic parameters of the value type, not null


Copyright © 2007–2015 Joda.org. All rights reserved.