Class SplitPoint<T extends SplitPointUnit,​U extends SplitPointDataSource<T,​U>>

  • Type Parameters:
    T - the type of split point units
    U - the type of data source

    public class SplitPoint<T extends SplitPointUnit,​U extends SplitPointDataSource<T,​U>>
    extends Object
    Provides a data object to keep the information about a split point result.
    • Constructor Detail

      • SplitPoint

        public SplitPoint​(List<T> head,
                          List<T> supplements,
                          U tail,
                          List<T> discarded,
                          boolean hardBreak)
        Create a new SplitPoint.
        Parameters:
        head - the part of the original SplitPointUnit list that fits within the target breakpoint
        supplements - a list of supplement units
        tail - the part of the original SplitPointUnit list that is left
        discarded - a list of discarded units
        hardBreak - set to true if a break point could not be achieved with respect for break point boundaries
    • Method Detail

      • getHead

        public List<T> getHead()
        Get the head part of the SplitPointUnit list.
        Returns:
        returns the head part of the SplitPointUnit list
      • getSupplements

        public List<T> getSupplements()
        Gets the supplements.
        Returns:
        returns the supplements
      • getTail

        public U getTail()
        Get the tail part of the SplitPointUnit list.
        Returns:
        returns the tail part of the SplitPointUnit list
      • getDiscarded

        public List<T> getDiscarded()
        Gets discarded units.
        Returns:
        returns the discarded units, if any
      • isHardBreak

        public boolean isHardBreak()
        Test if this SplitPoint was achieved by breaking on a unit other than a breakpoint.
        Returns:
        returns true if this SplitPoint was achieved by breaking on a unit other than a breakpoint
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object