jp.develop.common.util.amf.encoder
Interface IEncoder.IArrayEncoder<T>

All Known Implementing Classes:
ArrayCollectionEncoder, ArrayEncoder, CollectionEncoder, MapArrayEncoder
Enclosing interface:
IEncoder<T>

public static interface IEncoder.IArrayEncoder<T>

AMF encoder interface for array.


Method Summary
 int getArraySize(T array)
          Get the size of array.
 Iterator<Object> getIterator(T array)
          Get the iterator of specified array.
 Map<String,Object> getProperties(T array)
          Get the properties of specified array.
 Object getValue(T array, int index)
          Get the value of specified index.
 boolean isRandomAccess(T array)
          Is this random access array?
 

Method Detail

getArraySize

int getArraySize(T array)
Get the size of array.

Parameters:
array - Array to be encoded.
Returns:
The size of array.

isRandomAccess

boolean isRandomAccess(T array)
Is this random access array?

Returns:
true, if random access is available.

getValue

Object getValue(T array,
                int index)
Get the value of specified index. If it is not random access array, this method is not required to be implemented.

Parameters:
array - Array to be encoded.
index - Target index.
Returns:
The value of specified index.

getIterator

Iterator<Object> getIterator(T array)
Get the iterator of specified array. If it is random access array, this method is not required to be implemented.

Parameters:
array - Array to be encoded.
Returns:
Iterator of specified array.

getProperties

Map<String,Object> getProperties(T array)
Get the properties of specified array. This is for associative portion.

Returns:
Properties of specified array. Null means that there is no property.