Package org.joda.beans.ser
Class SerIterator
- java.lang.Object
-
- org.joda.beans.ser.SerIterator
-
public abstract class SerIterator extends Object
An abstraction of collections, lists, sets and maps.This is a plugin point that can handle Guava collections.
-
-
Constructor Summary
Constructors Constructor Description SerIterator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description SerCategorycategory()Gets the category of iterable.Objectcolumn()The column.Class<?>columnType()Gets the type of the column.intcount()Gets the number of occurrences of this item.intdimensionSize(int dimension)Gets the size of one dimension of the wrapped collection.abstract booleanhasNext()Checks if there is a next item.Objectkey()The key.Class<?>keyType()Gets the type of the key.abstract StringmetaTypeName()Gets the meta type of the underlying.abstract booleanmetaTypeRequired()Checks if the meta type of the underlying is required.abstract voidnext()Advances to the next item.abstract intsize()Gets the size of the wrapped collection.abstract Objectvalue()The value.Objectvalue(int row, int column)The value at a row/column.abstract Class<?>valueType()Gets the type of the value.abstract List<Class<?>>valueTypeTypes()Gets the generic parameters of the value type.
-
-
-
Method Detail
-
metaTypeName
public abstract String metaTypeName()
Gets the meta type of the underlying.- Returns:
- the type, such as 'List' or 'Map'
-
metaTypeRequired
public abstract boolean metaTypeRequired()
Checks if the meta type of the underlying is required.- Returns:
- true if generic inspection is insufficient to determine the collection
-
dimensionSize
public int dimensionSize(int dimension)
Gets the size of one dimension of the wrapped collection.- Parameters:
dimension- the dimension, 0 for row, 1 for column- Returns:
- the size, -1 if unknown
-
size
public abstract int size()
Gets the size of the wrapped collection.- Returns:
- the size, -1 if unknown
-
category
public SerCategory category()
Gets the category of iterable.- Returns:
- the category, not null
-
hasNext
public abstract boolean hasNext()
Checks if there is a next item.- Returns:
- true if there is another item
-
next
public abstract void next()
Advances to the next item.
-
count
public int count()
Gets the number of occurrences of this item.- Returns:
- the count
-
keyType
public Class<?> keyType()
Gets the type of the key.- Returns:
- the key type, null if no key
-
key
public Object key()
The key.- Returns:
- the key, may be null
-
columnType
public Class<?> columnType()
Gets the type of the column.- Returns:
- the column type, null if no column
-
column
public Object column()
The column.- Returns:
- the key, may be null
-
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
-
value
public abstract Object value()
The value.- Returns:
- the value, may be null
-
value
public Object value(int row, int column)
The value at a row/column.- Parameters:
row- the rowcolumn- the column- Returns:
- the value
-
-