java.lang.Object
org.openehealth.ipf.platform.camel.core.process.splitter.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 Details

    • 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
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object