|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.classify.feature.Feature
de.fu_berlin.ties.context.GlobalFeature
public class GlobalFeature
An immutable representation of a feature that can be used for classification.
Field Summary | |
---|---|
static String |
SEP
Separator string between axis and element names, used if neither or them is empty. |
Constructor Summary | |
---|---|
GlobalFeature(String myComment)
Creates a new instance that contains only a comment. |
|
GlobalFeature(String axisPrefix,
LocalFeature local)
Creates a new instance that combines a local feature with an axis prefix. |
Method Summary | |
---|---|
String |
getComment()
Returns the comment attached to this feature, if any. |
LocalFeature |
getLocalFeature()
Returns the local feature wrapped by this global feature. |
String |
getRepresentation()
Returns the representation of this feature, to be used for classification. |
static void |
globalize(String axisName,
Iterator<LocalFeature> localIter,
LinkedList<Feature> globalFeatures,
boolean addAtEnd)
Converts a series of LocalFeature s into global features,
adding the created global features to a linked list. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class de.fu_berlin.ties.classify.feature.Feature |
---|
equals, getFullRepresentation, getFullRepresentation, getStrength, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String SEP
Constructor Detail |
---|
public GlobalFeature(String axisPrefix, LocalFeature local)
axisPrefix
- the axis prefix wrapped by this featurelocal
- the local feature wrapped by this global featurepublic GlobalFeature(String myComment)
myComment
- a comment on the features to follow, ignored for
classificationMethod Detail |
---|
public static void globalize(String axisName, Iterator<LocalFeature> localIter, LinkedList<Feature> globalFeatures, boolean addAtEnd) throws ClassCastException
LocalFeature
s into global features,
adding the created global features to a linked list.
axisName
- the name of the global axislocalIter
- an iterator over the local features to globalizeglobalFeatures
- the created global features are added to this
linked listaddAtEnd
- whether to add the created features at the end of at the
beginning of the linked list
ClassCastException
- if the iterator refers to objects that aren't
LocalFeature
public String getComment()
getComment
in class Feature
null
is no comment was storedpublic LocalFeature getLocalFeature()
null
if this features doesn't
wrap a local feature (but only a comment)public String getRepresentation()
getRepresentation
in class Feature
null
if this feature
contains only a commentpublic String toString()
toString
in class Feature
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |