Package repast.simphony.space.projection
Class DefaultProjection<T>
java.lang.Object
repast.simphony.space.projection.DefaultProjection<T>
- All Implemented Interfaces:
- Projection<T>
- Direct Known Subclasses:
- AbstractContinuousSpace,- AbstractGrid,- DefaultGeography,- JungNetwork,- Projected3DGrid,- Projected3DSpace
- Version:
- $Revision$ $Date$
- Author:
- Nick Collier
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionDefaultProjection(String name) Creates a projection with the specified name.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddProjectionListener(ProjectionListener listener) Adds listener for this projection.booleanevaluate(ProjectionPredicate predicate) Evaluate this Projection against the specified Predicate.protected voidSends the specified evt to all the projection listeners.getName()Gets the name of this projection.Gets all the listeners for this projection.booleanremoveProjectionListener(ProjectionListener listener) Removes a listener from the this projection.
- 
Field Details- 
name
- 
listeners
 
- 
- 
Constructor Details- 
DefaultProjectionCreates a projection with the specified name.- Parameters:
- name- the name of the projection
 
 
- 
- 
Method Details- 
addProjectionListenerAdds listener for this projection.- Specified by:
- addProjectionListenerin interface- Projection<T>
- Parameters:
- listener- the listener to add.
 
- 
removeProjectionListenerRemoves a listener from the this projection.- Specified by:
- removeProjectionListenerin interface- Projection<T>
- Parameters:
- listener- the listener to remove
- Returns:
- true if the listener was succesfully removed, otherwise false
 
- 
fireProjectionEventSends the specified evt to all the projection listeners.- Parameters:
- evt- the evt to send
 
- 
getProjectionListenersGets all the listeners for this projection.- Specified by:
- getProjectionListenersin interface- Projection<T>
- Returns:
- an iterable over all the listeners for this projection.
 
- 
evaluateEvaluate this Projection against the specified Predicate. This typically involves a double dispatch where the Projection calls back to the predicate, passing itself.- Specified by:
- evaluatein interface- Projection<T>
- Parameters:
- predicate-
- Returns:
- true if the predicate evaluates to true, otherwise false. False can also mean that the predicate is not applicable to this Projection. For example, a linked type predicate evaluated against a grid projection.
 
- 
getNameGets the name of this projection.- Specified by:
- getNamein interface- Projection<T>
- Returns:
- the name of this Projection.
 
 
-