|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umd.cfar.lamp.viper.util.Equivalencies
This allows equivalency between two different Strings. Unlike a Map, it can take Many-Many mappings.
Constructor Summary | |
Equivalencies()
Creates a new object of the Equivalency class. |
Method Summary | |
void |
addToList(java.lang.Object target,
java.lang.Object candidate)
Adds a new entry saying that target is equivalent to candidate. |
boolean |
containsKey(java.lang.Object key)
Determines if the specified key / right Object is in the list of Pairings. |
boolean |
containsValue(java.lang.Object value)
Determines if the specified Value / left Object is in the list of Pairings. |
boolean |
eq(java.lang.Object target,
java.lang.Object candidate)
Determines if the given key and value are equivalent under this set of Equivalencies |
java.lang.Object[] |
findMatches(java.lang.Object target)
Returns all values associated with the key. |
int |
hashCode()
Generates a hash value for this object. |
boolean |
parseMapping(java.util.Vector paths)
Parses in an Equivalency class in ViPER format. |
boolean |
parseMapping(VReader reader)
Parses in an Equivalency class in ViPER format. |
void |
printMapping(java.io.PrintWriter out)
Prints the Equivalencies to a PrintStream in classic ViPER format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Equivalencies()
Method Detail |
public boolean containsKey(java.lang.Object key)
key
- The key to search for.
true
iff this list holds the keypublic boolean containsValue(java.lang.Object value)
value
- - the value to search for
public int hashCode()
public void addToList(java.lang.Object target, java.lang.Object candidate)
target
- The key / left Objectcandidate
- The value / right Objectpublic java.lang.Object[] findMatches(java.lang.Object target)
target
- The key to find.
public boolean eq(java.lang.Object target, java.lang.Object candidate)
target
- The key / left Object.candidate
- The value / right Object.
true
iff the pairing is found.public void printMapping(java.io.PrintWriter out)
out
- A PrintWriter
to write into.public boolean parseMapping(java.util.Vector paths)
paths
- A Vector
containing the names
of any files containing Equivalency information
true
if parsing is successfulpublic boolean parseMapping(VReader reader)
reader
- A VReader
containing Equivalency data.
true
if Parsing is successful.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |