org.mitre.midiki.workshop
Class Synonym
java.lang.Object
|
+--org.mitre.midiki.workshop.Synonym
- All Implemented Interfaces:
- java.io.Serializable
- public class Synonym
- extends java.lang.Object
- implements java.io.Serializable
Identifies a list of symptom names which are considered to be identical.
The first symptom in the list is the way it will be known.
Case is not significant, but no more sophisticated fault-tolerance
is provided. In particular, there is no notion of distance between
a presented string and this synonym set.
- Since:
- 1.0
- See Also:
Serializable
, Serialized Form
Constructor Summary |
Synonym()
Creates a new Synonym instance. |
Method Summary |
void |
addSynonym(java.lang.String s)
Adds a synonym to the set. |
java.lang.String |
getDefault()
Returns the first string added to this set. |
boolean |
isSynonymFor(java.lang.String n)
Returns true if the specified string appears
in this synonym set. |
java.util.Iterator |
iterator()
Provides public access to the contents of this synonym set. |
java.lang.String |
toString()
Generate a string representation of this set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Synonym
public Synonym()
- Creates a new
Synonym
instance.
toString
public java.lang.String toString()
- Generate a string representation of this set.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a
String
value
addSynonym
public void addSynonym(java.lang.String s)
- Adds a synonym to the set.
- Parameters:
s
- a String
value
getDefault
public java.lang.String getDefault()
- Returns the first string added to this set.
- Returns:
- a
String
value
isSynonymFor
public boolean isSynonymFor(java.lang.String n)
- Returns
true
if the specified string appears
in this synonym set.
- Parameters:
n
- a String
value- Returns:
- a
boolean
value
iterator
public java.util.Iterator iterator()
- Provides public access to the contents of this synonym set.
- Returns:
- an
Iterator
value