|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectproper.core.ProperObject
proper.imp.Traverser
public class Traverser
This class extracts useful information from a given structure.
Field Summary |
---|
Fields inherited from interface proper.core.ProperInterface |
---|
VERSION |
Constructor Summary | |
---|---|
Traverser(java.util.Vector predicates)
initializes the object |
Method Summary | |
---|---|
void |
add(Predicate p)
adds the specified predicate |
java.util.Vector |
findAll()
returns all predicates/lists |
java.util.Vector |
findAll(java.lang.String name)
returns all occurences of the specified predicate/list |
java.util.Vector |
findAllArgTypes(java.lang.String name)
returns a vector with all the types of argument of the given predicate or list. |
java.util.Vector |
findAllLists()
returns all lists |
java.util.Vector |
findAllLists(java.lang.String name)
returns all occurences of the specified list |
java.util.Vector |
findAllPredicates()
returns all predicates |
java.util.Vector |
findAllPredicates(java.lang.String name)
returns all occurences of the specified predicate |
Data |
findFirst(java.lang.String name)
returns the first occurence of the specified predicate/list, can be NULL |
List |
findFirstList(java.lang.String name)
returns the first occurence of the specified list, can be NULL |
Predicate |
findFirstPredicate(java.lang.String name)
returns the first occurence of the specified predicate, can be NULL |
java.util.Vector |
getAll()
returns all distinct predicates and lists |
java.util.Vector |
getAllValues(java.lang.String name,
int index)
returns all the values of an argument for a given predicate/list |
java.util.Vector |
getLists()
returns all distinct lists |
int |
getMaxLength(java.lang.String name,
int index)
returns the max. |
java.util.Vector |
getPredicates()
returns all distinct predicates |
java.util.Hashtable |
indexPredicate(java.lang.String name,
int index)
returns a hashtable that indexes the given predicate over the argument specified by index - for faster access. |
void |
invalidate()
resets the analyzed status to FALSE, i.e. |
boolean |
isPredicate(java.lang.String name)
checks whether the given name is a predicate or not |
boolean |
keyIsUnique(java.lang.String name)
checks whether the first argument of the specified predicate is unique |
void |
remove(Data d)
removes the specified predicate/list |
void |
shuffleIDs()
randomizes all the IDs of the stored items, for destroying implicit information about the creation order and therefore classes |
java.lang.String |
toString()
the stored predicates in string representation |
Methods inherited from class proper.core.ProperObject |
---|
addListener, addOutput, classInVerbose, debugprint, debugprint, debugprint, debugprint, debugprintln, debugprintln, debugprintln, debugprintln, debugprintln, getListeners, getRuntime, getVerbose, getVerboseLevel, getVerboseLevelForClass, getVerboseString, getVerboseStringForClass, notifyListener, notifyListeners, print, print, print, print, println, println, println, println, println, printMemory, removeListener, setOutput, setVerbose, setVerboseLevel, setVerboseString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Traverser(java.util.Vector predicates)
predicates
- the Predicates to work withMethod Detail |
---|
public void invalidate()
public boolean isPredicate(java.lang.String name)
public java.util.Vector getAll()
public java.util.Vector getPredicates()
public java.util.Vector getLists()
public Data findFirst(java.lang.String name)
public Predicate findFirstPredicate(java.lang.String name)
public List findFirstList(java.lang.String name)
public java.util.Vector findAll(java.lang.String name)
public java.util.Vector findAllPredicates(java.lang.String name)
public java.util.Vector findAll()
public java.util.Vector findAllPredicates()
public java.util.Vector findAllLists(java.lang.String name)
public java.util.Vector findAllLists()
public java.util.Vector findAllArgTypes(java.lang.String name)
public int getMaxLength(java.lang.String name, int index)
name
- the name of the predicateindex
- the index of the argument, starts with 0public java.util.Vector getAllValues(java.lang.String name, int index)
name
- the predicate to search inindex
- the index of the argument, starts with 0
public void shuffleIDs()
public boolean keyIsUnique(java.lang.String name)
name
- the name of the predicate to checkpublic void remove(Data d)
public void add(Predicate p)
public java.util.Hashtable indexPredicate(java.lang.String name, int index)
public java.lang.String toString()
toString
in class ProperObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |