jasi.sim.user.util
Class ClassSearchVisitor<T,S extends T>

java.lang.Object
  extended by jasi.sim.user.util.ClassSearchVisitor<T,S>
Type Parameters:
T - Type of class to look through.
S - Type of class to select.
All Implemented Interfaces:
Visitor<T>

public class ClassSearchVisitor<T,S extends T>
extends java.lang.Object
implements Visitor<T>

A visitor, which selects all instances of a class for the visited objects.


Constructor Summary
ClassSearchVisitor(java.lang.Class<S> searched)
          Constructor for PrintVisitor.
 
Method Summary
 java.util.Collection<S> getFound()
          Get all found instances.
 boolean isDone()
          All visited objects will be visited.
 void visit(T visitable)
          Print the visited Objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassSearchVisitor

public ClassSearchVisitor(java.lang.Class<S> searched)
Constructor for PrintVisitor.

Parameters:
searched - The searched class.
Method Detail

visit

public void visit(T visitable)
Print the visited Objects.

Specified by:
visit in interface Visitor<T>
Parameters:
visitable - The visited object.
See Also:
Visitor.isDone()

isDone

public boolean isDone()
All visited objects will be visited.

Specified by:
isDone in interface Visitor<T>
Returns:
Always false.
See Also:
Visitor.isDone()

getFound

public java.util.Collection<S> getFound()
Get all found instances.

Returns:
The collection of found instances.