Package org.joda.beans.ser
Class SerIterable
- java.lang.Object
-
- 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
Constructors Constructor Description SerIterable()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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 keycolumn
- the column, such as for a table, null if no columnvalue
- the value, such as for a map or list value, may be nullcount
- 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
-
-