public abstract class TextSegmentSet<T>
extends java.lang.Object
implements java.lang.Iterable<T>
Constructor and Description |
---|
TextSegmentSet(com.google.common.base.Function<? super T,? extends ITextSegment> region,
com.google.common.base.Function<? super T,java.lang.String> title) |
Modifier and Type | Method and Description |
---|---|
void |
add(T segment) |
abstract void |
add(T segment,
IMerger<T> merger) |
protected ITextSegment |
getRegion(T t) |
com.google.common.base.Function<? super T,? extends ITextSegment> |
getRegionAccess() |
protected java.lang.String |
getTitle(T t) |
java.util.IdentityHashMap<T,RegionTrace> |
getTraces() |
protected void |
handleConflict(java.util.List<T> conflicts,
java.lang.Exception cause) |
protected boolean |
isConflict(ITextSegment region1,
ITextSegment region2) |
protected boolean |
isConflict(T t1,
T t2) |
java.lang.String |
toString() |
public TextSegmentSet(com.google.common.base.Function<? super T,? extends ITextSegment> region, com.google.common.base.Function<? super T,java.lang.String> title)
protected java.lang.String getTitle(T t)
public void add(T segment) throws ConflictingRegionsException
ConflictingRegionsException
public abstract void add(T segment, IMerger<T> merger) throws ConflictingRegionsException
ConflictingRegionsException
protected ITextSegment getRegion(T t)
public com.google.common.base.Function<? super T,? extends ITextSegment> getRegionAccess()
public java.util.IdentityHashMap<T,RegionTrace> getTraces()
protected void handleConflict(java.util.List<T> conflicts, java.lang.Exception cause) throws ConflictingRegionsException
ConflictingRegionsException
protected boolean isConflict(ITextSegment region1, ITextSegment region2)
public java.lang.String toString()
toString
in class java.lang.Object