Package ch.astorm.jotlmsg.io
Class FlatEntryListStructure<T extends FlatEntryStructure>
- java.lang.Object
-
- ch.astorm.jotlmsg.io.FlatEntryListStructure<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
public class FlatEntryListStructure<T extends FlatEntryStructure> extends java.lang.Object implements java.lang.Iterable<T>Represents an [MS-OXCDATA] 2.3.3 FlatEntryList Structure in Java.- Author:
- Guido Stein
-
-
Constructor Summary
Constructors Constructor Description FlatEntryListStructure()Constructor, creates an empty java list representation.FlatEntryListStructure(java.lang.Class<T> clazz, byte[] bytes)Constructor, creates a java list representation from byte array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFlatEntryStructure(T flatEntry)Adds a FlatEntryStructure.longgetCount()Returns the number of FlatEntryStructures.java.util.List<T>getFlatEntryStructures()Returns a list of FlatEntryStructures or subclass structures.longgetSize()Returns the number of total bytes of all FlatEntryStructures.java.util.Iterator<T>iterator()voidsetFlatEntryStructures(java.util.List<T> flatEntries)Sets a list of FlatEntryStructures.byte[]toBytes()Creates a byte array.
-
-
-
Constructor Detail
-
FlatEntryListStructure
public FlatEntryListStructure()
Constructor, creates an empty java list representation.
-
FlatEntryListStructure
public FlatEntryListStructure(java.lang.Class<T> clazz, byte[] bytes)
Constructor, creates a java list representation from byte array.- Parameters:
clazz- Class/subclass ofFlatEntryListStructureused to create list elements.bytes- Byte array source.
-
-
Method Detail
-
getCount
public long getCount()
Returns the number of FlatEntryStructures.- Returns:
- Number of structures.
-
getSize
public long getSize()
Returns the number of total bytes of all FlatEntryStructures.- Returns:
- Number of total bytes.
-
getFlatEntryStructures
public java.util.List<T> getFlatEntryStructures()
Returns a list of FlatEntryStructures or subclass structures.- Returns:
- List of structures.
-
setFlatEntryStructures
public void setFlatEntryStructures(java.util.List<T> flatEntries)
Sets a list of FlatEntryStructures.- Parameters:
flatEntries- List of FlatEntryStructures or subclass structures to set.
-
addFlatEntryStructure
public void addFlatEntryStructure(T flatEntry)
Adds a FlatEntryStructure.- Parameters:
flatEntry- FlatEntryStructure or subclass to add.
-
toBytes
public byte[] toBytes()
Creates a byte array.- Returns:
- Byte array representation of this list.
-
iterator
public java.util.Iterator<T> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<T extends FlatEntryStructure>
-
-