Class ObjectList<E>

Type Parameters:
E - the element type.
All Implemented Interfaces:
Serializable, Cloneable, Iterable<E>, Collection<E>, List<E>, RandomAccess, SequencedCollection<E>

public class ObjectList<E> extends Vector<E>

Utility class to hold a list of objects.

Link to GitHub: Source File.

Author:
Øystein Myhre Andersen
See Also:
  • Constructor Details

    • ObjectList

      public ObjectList()
      Default constructor.
  • Method Details

    • add

      public boolean add(Object obj)
      Specified by:
      add in interface Collection<E>
      Specified by:
      add in interface List<E>
      Overrides:
      add in class Vector<E>
    • write

      public static void write(ObjectList<?> list, AttributeOutputStream oupt) throws IOException
      Write an ObjectList to a AttributeOutputStream.
      Parameters:
      list - the list to be written.
      oupt - the AttributeOutputStream to write to.
      Throws:
      IOException - if something went wrong.
    • read

      public static ObjectList<?> read(AttributeInputStream inpt) throws IOException
      Read and return an ObjectList.
      Parameters:
      inpt - the AttributeInputStream to read from
      Returns:
      the ObjectList object read from the stream.
      Throws:
      IOException - if something went wrong.