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
ConstructorsConstructorDescriptionConstructor, creates an empty java list representation.FlatEntryListStructure(Class<T> clazz, byte[] bytes) Constructor, creates a java list representation from byte array. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddFlatEntryStructure(T flatEntry) Adds a FlatEntryStructure.longgetCount()Returns the number of FlatEntryStructures.Returns a list of FlatEntryStructures or subclass structures.longgetSize()Returns the number of total bytes of all FlatEntryStructures.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, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FlatEntryListStructure
public FlatEntryListStructure()Constructor, creates an empty java list representation. -
FlatEntryListStructure
Constructor, creates a java list representation from byte array.- Parameters:
clazz- Class/subclass ofFlatEntryListStructureused to create list elements.bytes- Byte array source.
-
-
Method Details
-
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
Returns a list of FlatEntryStructures or subclass structures.- Returns:
- List of structures.
-
setFlatEntryStructures
Sets a list of FlatEntryStructures.- Parameters:
flatEntries- List of FlatEntryStructures or subclass structures to set.
-
addFlatEntryStructure
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
- Specified by:
iteratorin interfaceIterable<T extends FlatEntryStructure>
-