Package org.daisy.dotify.common.splitter
Class SplitPoint<T extends SplitPointUnit,U extends SplitPointDataSource<T,U>>
- java.lang.Object
-
- org.daisy.dotify.common.splitter.SplitPoint<T,U>
-
- Type Parameters:
T
- the type of split point unitsU
- 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
List<T>
getDiscarded()
Gets discarded units.List<T>
getHead()
Get the head part of the SplitPointUnit list.List<T>
getSupplements()
Gets the supplements.U
getTail()
Get the tail part of the SplitPointUnit list.int
hashCode()
boolean
isHardBreak()
Test if this SplitPoint was achieved by breaking on a unit other than a breakpoint.
-
-
-
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 breakpointsupplements
- a list of supplement unitstail
- the part of the original SplitPointUnit list that is leftdiscarded
- a list of discarded unitshardBreak
- 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
-
-