org.joda.beans.ser
Interface SerIterator


public interface SerIterator

An abstraction of collections, lists, sets and maps.

This is a plugin point that can handle Guava collections.


Method Summary
 int count()
          Gets the number of occurrences of this item.
 boolean hasNext()
          Checks if there is a next item.
 boolean isMapLike()
          Is the iterator map-like, as opposed to collection-like.
 Object key()
          The key.
 Class<?> keyType()
          Gets the type of the key.
 String metaTypeName()
          Gets the meta type of the underlying.
 void next()
          Advances to the next item.
 int size()
          Gets the size of the wrapped collection.
 Object value()
          The value.
 Class<?> valueType()
          Gets the type of the value.
 List<Class<?>> valueTypeTypes()
          Gets the generic parameters of the value type.
 

Method Detail

metaTypeName

String metaTypeName()
Gets the meta type of the underlying.

Returns:
the type, such as 'List' or 'Map'

size

int size()
Gets the size of the wrapped collection.

Returns:
the size, -1 if unknown

isMapLike

boolean isMapLike()
Is the iterator map-like, as opposed to collection-like.

Returns:
true if map-like, false if collection-like

hasNext

boolean hasNext()
Checks if there is a next item.

Returns:
true if there is another item

next

void next()
Advances to the next item.


count

int count()
Gets the number of occurrences of this item.

Returns:
the count

keyType

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

Returns:
the key type, null if no key

key

Object key()
The key.

Returns:
the key, may be null

valueType

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

Returns:
the value type, not null

valueTypeTypes

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

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

value

Object value()
The value.

Returns:
the value, may be null


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