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 Details

    • 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 of FlatEntryListStructure used 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

      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.
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T extends FlatEntryStructure>