elge.agent
Interface AgentRepresentation

All Superinterfaces:
Collection, List, Serializable
All Known Implementing Classes:
VectorRepresentation

public interface AgentRepresentation
extends List, Serializable, Collection

AgentRepresentation is for storing the agents. It is used by the AgentContainer class. The extends of this class are that it has some dimension that can be setted and also a propertychange support should available by it implementors

Author:
Pavol Žibrita

Field Summary
static String PROP_DIMENSION
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds a listener.
 Dimension getDimension()
          gets the dimension.
 void removePropertyChangeListener(PropertyChangeListener listener)
          removes listener
 Point rndPosition()
          Generates position somewhere within the representation dimension.
 Point rndRelPosition(Point from, double radius)
          Like rndPosition, but it generates relativee from point from with max distance to point radius.
 void setDimension(Dimension d)
          Should set the dimension of the imeplemnting class, but it could be not supported.
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Field Detail

PROP_DIMENSION

public static final String PROP_DIMENSION
See Also:
Constant Field Values
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener listener)
Adds a listener.

Parameters:
listener - listener
See Also:
PropertyChangeListener

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener listener)
removes listener

Parameters:
listener - listener
See Also:
PropertyChangeListener

setDimension

public void setDimension(Dimension d)
Should set the dimension of the imeplemnting class, but it could be not supported.

Parameters:
d - the dimenstion

getDimension

public Dimension getDimension()
gets the dimension.

Returns:
the simension. It can be null if not supported.

rndPosition

public Point rndPosition()
Generates position somewhere within the representation dimension.

Returns:
returns the position or null if not suported.

rndRelPosition

public Point rndRelPosition(Point from,
                            double radius)
Like rndPosition, but it generates relativee from point from with max distance to point radius. Welll

Parameters:
from - relative point
radius - distance
Returns:
the point or null if not supported.