|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jagg.msd.AbstractExtractor<E,T>
E
- The type of element.T
- The type of label generated by the chained extractor.public abstract class AbstractExtractor<E,T>
An AbstractExtractor
encapsulates functionality needed by all
Extractors
, specifically, determining whether an Extractor is
complete, and a chained Extractor
.
Field Summary | |
---|---|
protected boolean |
amIAllComplete
Controlled by a discriminator, this notes down whether an equivalence class is "complete", such that all elements in an equivalence class have been examined completely. |
protected Extractor<E,T> |
myExtractor
The chained Extractor . |
protected int |
myIndex
The index that influences label generation. |
Constructor Summary | |
---|---|
AbstractExtractor(Extractor<E,T> extractor)
Creates an AbstractExtractor that uses the given
Extractor in a chain for its labels. |
Method Summary | |
---|---|
boolean |
isAllComplete()
The specific Discriminator calls this method to determine
whether all elements in the current equivalence class were complete. |
abstract boolean |
isComplete(E element)
Determines whether discrimination is complete for the given element, at the given index. |
void |
setAllComplete(boolean allComplete)
The Discriminator calls this method to indicate whether all
elements in its current equivalence class were complete. |
void |
setIndex(int index)
Sets which portion is retrieved as the label. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int myIndex
protected Extractor<E,T> myExtractor
Extractor
.
protected boolean amIAllComplete
Constructor Detail |
---|
public AbstractExtractor(Extractor<E,T> extractor)
AbstractExtractor
that uses the given
Extractor
in a chain for its labels.
extractor
- The chained Extractor
.Method Detail |
---|
public void setIndex(int index)
index
- The index.public abstract boolean isComplete(E element)
IndexOutOfBoundsException
, would return true
here so the algorithm doesn't call getLabel
. All
AbstractExtractors
should check their chained
Extractor
, to see if it's complete first.
element
- The element.
true
if discrimination is complete or cannot
continue, usually because the discrimination has run off the end of
the label, false
otherwise.public void setAllComplete(boolean allComplete)
Discriminator
calls this method to indicate whether all
elements in its current equivalence class were complete.
allComplete
- Whether all elements were complete.public boolean isAllComplete()
Discriminator
calls this method to determine
whether all elements in the current equivalence class were complete.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |