Package ch.astorm.jotlmsg.io
Class FlatEntryListStructure<T extends FlatEntryStructure>
- java.lang.Object
-
- ch.astorm.jotlmsg.io.FlatEntryListStructure<T>
-
- All Implemented Interfaces:
Iterable<T>
public class FlatEntryListStructure<T extends FlatEntryStructure> extends Object implements 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(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.List<T>getFlatEntryStructures()Returns a list of FlatEntryStructures or subclass structures.longgetSize()Returns the number of total bytes of all FlatEntryStructures.Iterator<T>iterator()voidsetFlatEntryStructures(List<T> flatEntries)Sets a list of FlatEntryStructures.byte[]toBytes()Creates a byte array.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
FlatEntryListStructure
public FlatEntryListStructure()
Constructor, creates an empty java list representation.
-
FlatEntryListStructure
public FlatEntryListStructure(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 List<T> getFlatEntryStructures()
Returns a list of FlatEntryStructures or subclass structures.- Returns:
- List of structures.
-
setFlatEntryStructures
public void setFlatEntryStructures(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.
-
-