Class TextSegmentSet<T>
- java.lang.Object
-
- org.eclipse.xtext.formatting2.internal.TextSegmentSet<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>
- Direct Known Subclasses:
ArrayListTextSegmentSet
public abstract class TextSegmentSet<T> extends java.lang.Object implements java.lang.Iterable<T>
-
-
Constructor Summary
Constructors Constructor Description TextSegmentSet(com.google.common.base.Function<? super T,? extends ITextSegment> region, com.google.common.base.Function<? super T,java.lang.String> title)
TextSegmentSet(com.google.common.base.Function<? super T,? extends ITextSegment> region, com.google.common.base.Function<? super T,java.lang.String> title, boolean trace)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
add(T segment)
abstract void
add(T segment, IMerger<T> merger)
abstract T
get(T segment)
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()
Deprecated.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)
abstract java.util.Iterator<T>
iteratorAfter(T segment)
abstract java.lang.Iterable<T>
reverseIterable()
java.lang.String
toString()
protected void
trace(T segment)
-
-
-
Constructor Detail
-
TextSegmentSet
public TextSegmentSet(com.google.common.base.Function<? super T,? extends ITextSegment> region, com.google.common.base.Function<? super T,java.lang.String> title)
-
TextSegmentSet
public TextSegmentSet(com.google.common.base.Function<? super T,? extends ITextSegment> region, com.google.common.base.Function<? super T,java.lang.String> title, boolean trace)
-
-
Method Detail
-
add
public void add(T segment) throws ConflictingRegionsException, RegionTraceMissingException
-
add
public abstract void add(T segment, IMerger<T> merger) throws ConflictingRegionsException
- Throws:
ConflictingRegionsException
-
getRegion
protected ITextSegment getRegion(T t)
-
getRegionAccess
public com.google.common.base.Function<? super T,? extends ITextSegment> getRegionAccess()
-
getTitle
protected java.lang.String getTitle(T t)
-
getTraces
@Deprecated public java.util.IdentityHashMap<T,RegionTrace> getTraces()
Deprecated.
-
handleConflict
protected void handleConflict(java.util.List<T> conflicts, java.lang.Exception cause) throws ConflictingRegionsException, RegionTraceMissingException
-
isConflict
protected boolean isConflict(ITextSegment region1, ITextSegment region2)
-
reverseIterable
public abstract java.lang.Iterable<T> reverseIterable()
- Since:
- 2.13
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
trace
protected void trace(T segment)
-
-