Class SplitIndex


  • public final class SplitIndex
    extends Object
    Immutable class specifying an index of a split performed by Splitter. This class contains all necessary information about the an index of an exchange that was split off. This includes the actual index as well as a flag indicating that the index is the last in the collection of sub exchanges. - Immutable - fully thread-safe - not for subclassing - uses static factory methods
    Author:
    Jens Riemschneider
    • Method Detail

      • valueOf

        public static SplitIndex valueOf​(int index,
                                         boolean last)
        Static factory method to return a split index
        Parameters:
        index - actual Index of an exchange in the corresponding collection of sub exchanges
        last - true if this index is the last in the corresponding collection of sub exchanges
        Returns:
        A SplitIndex corresponding to the index information
      • getIndex

        public int getIndex()
        Returns:
        the index in the corresponding collection of sub exchanges
      • isLast

        public boolean isLast()
        Returns:
        true if this index is the last in the corresponding collection of sub exchanges
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object