|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectLBJ2.classify.Feature
Objects of this class represent the value of a Classifier's
decision.
| Field Summary | |
protected java.lang.String |
containingPackage
The Java package containing the classifier that produced
this feature. |
protected java.lang.String |
identifier
The identifier string distinguishes this
Feature from other Features. |
| Constructor Summary | |
Feature(java.lang.String p,
java.lang.String i)
Initializing constructor. |
|
| Method Summary | |
java.lang.Object |
clone()
Returns a shallow clone of this Feature. |
int |
compareTo(java.lang.Object o)
Used to sort features via a lexicographic comparison of their packages and identifiers. |
abstract Feature |
conjunction(Feature f,
Classifier c)
Create a feature representing the conjunction of this feature with the given argument feature. |
protected abstract Feature |
conjunctWith(DiscreteArrayFeature f,
Classifier c)
Create a feature representing the conjunction of this feature with the given argument feature. |
protected abstract Feature |
conjunctWith(DiscreteFeature f,
Classifier c)
Create a feature representing the conjunction of this feature with the given argument feature. |
protected abstract Feature |
conjunctWith(RealArrayFeature f,
Classifier c)
Create a feature representing the conjunction of this feature with the given argument feature. |
protected abstract Feature |
conjunctWith(RealFeature f,
Classifier c)
Create a feature representing the conjunction of this feature with the given argument feature. |
boolean |
equals(java.lang.Object o)
Two Features are equal when their packages and identifiers
are equivalent. |
boolean |
fromArray()
Determines if this feature comes from an array. |
java.lang.String |
getIdentifier()
Retrieves this feature's identifier. |
java.lang.String |
getPackage()
Retrieves this feature's package. |
abstract java.lang.String |
getStringValue()
Gives a string representation of the value of this feature. |
int |
hashCode()
The hash code of a Feature is the hash code of its package
plus the hash code of its identifier. |
void |
intern()
Makes sure that the identifier is intern()ed. |
boolean |
nameEquals(Feature f)
Determines whether the argument feature has equivalent package and identifier. |
private void |
readObject(java.io.ObjectInputStream in)
Special handling during deserialization to ensure that Strings are intern()ed. |
void |
setArrayLength(int l)
If this feature is an array feature, call this method to set its array length; otherwise, this method has no effect. |
int |
totalValues()
Returns the total number of values this feature might possibly be set to. |
abstract boolean |
valueEquals(java.lang.String v)
Determines whether or not the parameter is equivalent to the string representation of the value of this feature. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String containingPackage
package containing the classifier that produced
this feature.
protected java.lang.String identifier
identifier string distinguishes this
Feature from other Features.
| Constructor Detail |
public Feature(java.lang.String p,
java.lang.String i)
p - The package containing the classifier that produced this
feature.i - The new feature's identifier.| Method Detail |
public java.lang.String getPackage()
public java.lang.String getIdentifier()
public abstract java.lang.String getStringValue()
public boolean nameEquals(Feature f)
f - The feature with which to compare this feature.
true iff f has identical containing
package and equivalent identifier.public abstract boolean valueEquals(java.lang.String v)
v - The string to compare against.
true iff the parameter is equivalent to the
string representation of the value of this feature.public void intern()
intern()ed. Note that
the containing package need not be intern()ed since it's
always initialized with literals.
public boolean fromArray()
true iff this feature comes from an array.public int totalValues()
public void setArrayLength(int l)
l - The new length.
public abstract Feature conjunction(Feature f,
Classifier c)
f - The feature to conjunct with.c - The classifier producing the resulting feature.
f.
protected abstract Feature conjunctWith(DiscreteFeature f,
Classifier c)
f - The feature to conjunct with.c - The classifier producing the resulting feature.
f.
protected abstract Feature conjunctWith(DiscreteArrayFeature f,
Classifier c)
f - The feature to conjunct with.c - The classifier producing the resulting feature.
f.
protected abstract Feature conjunctWith(RealFeature f,
Classifier c)
f - The feature to conjunct with.c - The classifier producing the resulting feature.
f.
protected abstract Feature conjunctWith(RealArrayFeature f,
Classifier c)
f - The feature to conjunct with.c - The classifier producing the resulting feature.
f.public int hashCode()
Feature is the hash code of its package
plus the hash code of its identifier.
Feature.public boolean equals(java.lang.Object o)
Features are equal when their packages and identifiers
are equivalent.
true iff the argument is an equivalent
Feature.public int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - An object to compare with.
String comparison of the
concatenations of the features' packages and identifiers would
return.public java.lang.Object clone()
Feature.
private void readObject(java.io.ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException
Strings are intern()ed.
in - The stream to deserialize from.
java.io.IOException
java.lang.ClassNotFoundException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||