Class OrderedObject<E>

  • Type Parameters:
    E - Type of the element to be ordered

    public class OrderedObject<E>
    extends java.lang.Object
    A simple class for ordering objects.
    Since:
    4.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private E element  
      private long ordinal  
    • Constructor Summary

      Constructors 
      Constructor Description
      OrderedObject​(long ordinal, E element)
      Creates an object with an order.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E getElement()  
      long getOrdinal()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ordinal

        private final long ordinal
      • element

        private final E element
    • Constructor Detail

      • OrderedObject

        public OrderedObject​(long ordinal,
                             E element)
        Creates an object with an order.
        Parameters:
        ordinal - The position in a sequence of objects
        element - The object being sequenced
    • Method Detail

      • getOrdinal

        public long getOrdinal()
        Returns:
        The position in a sequence of objects
      • getElement

        public E getElement()
        Returns:
        The object being sequenced