PkgAgentSystem.Experiences
Class StatementEnumeration
java.lang.Object
|
+--FIM.Util.FilterEnumeration
|
+--PkgAgentSystem.Experiences.StatementEnumeration
- All Implemented Interfaces:
- Enumeration
- public final class StatementEnumeration
- extends FilterEnumeration
An enumeration which returns only statements with a certain characteristic from a vector.
- Version:
- 1.0, 1.7.2000
- Author:
- Michael Sonntag
Constructor Summary |
StatementEnumeration(Vector vector,
String characteristic)
Creates a new enumeration returning only statements with a certain characteristic from a vector of statements. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StatementEnumeration
public StatementEnumeration(Vector vector,
String characteristic)
- Creates a new enumeration returning only statements with a certain characteristic from a vector of statements.
- Parameters:
vector
- the Vector
containing all statementscharacteristic
- the characteristic to return only (if null
, all statements are returned)
matchesFilter
protected boolean matchesFilter(Object toTest)
- The function implementing the filtering function.
- Overrides:
matchesFilter
in class FilterEnumeration
- Parameters:
totest
- the object to test if it matches the filter- Returns:
true
if the element should be returned; false
if this
element does not match the criteria and should be suppressed
nextStatement
public Statement nextStatement()
- Returns the next statement of this enumeration. Convenience function which does only a typecast.
- Returns:
- the next statement of this enumeration
- Throws:
NoSuchElementException
- if no more statements exist
Submit a bug
Copyright 2001,2002 Michael Sonntag & Institute for Information Processing and Microprocessor Technology (FIM), Johannes-Kepler-University Linz, Altenbergerstr. 69, A-4040 Linz, Austria.