org.ascape.model.space
Class DefaultNode

java.lang.Object
  extended by org.ascape.model.space.DefaultLocation
      extended by org.ascape.model.space.DefaultNode
All Implemented Interfaces:
Location, Node

public class DefaultNode
extends DefaultLocation
implements Node

The Class DefaultNode.


Constructor Summary
DefaultNode()
           
 
Method Summary
 java.util.List findNeighbors()
          Find neighbors.
 Node findRandomAvailableNeighbor()
          Find random neighbor.
 Node findRandomNeighbor()
          Find random neighbor.
 Node getOccupant()
          Gets the occupant.
 java.util.Random getRandom()
          Gets the random.
 boolean isAvailable()
          Checks if is available.
 void setOccupant(Node occupant)
          Sets the occupant.
 void setRandom(java.util.Random random)
          Sets the random.
 
Methods inherited from class org.ascape.model.space.DefaultLocation
clearDeleteMarker, clone, getCoordinate, initialize, isDelete, markForDeletion, setCoordinate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.ascape.model.space.Location
clearDeleteMarker, clone, getCoordinate, initialize, isDelete, markForDeletion, setCoordinate
 

Constructor Detail

DefaultNode

public DefaultNode()
Method Detail

findNeighbors

public java.util.List findNeighbors()
Description copied from interface: Node
Find neighbors.

Specified by:
findNeighbors in interface Node
Returns:
the list

findRandomNeighbor

public Node findRandomNeighbor()
Description copied from interface: Node
Find random neighbor.

Specified by:
findRandomNeighbor in interface Node
Returns:
the node

findRandomAvailableNeighbor

public Node findRandomAvailableNeighbor()
Description copied from interface: Node
Find random neighbor.

Specified by:
findRandomAvailableNeighbor in interface Node
Returns:
the node

getOccupant

public Node getOccupant()
Description copied from interface: Node
Gets the occupant.

Specified by:
getOccupant in interface Node
Returns:
the occupant

isAvailable

public boolean isAvailable()
Description copied from interface: Node
Checks if is available.

Specified by:
isAvailable in interface Node
Returns:
true, if is available

setOccupant

public void setOccupant(Node occupant)
Description copied from interface: Node
Sets the occupant.

Specified by:
setOccupant in interface Node
Parameters:
occupant - the occupant

getRandom

public java.util.Random getRandom()
Gets the random.

Returns:
the random

setRandom

public void setRandom(java.util.Random random)
Sets the random.

Parameters:
random - the new random


Copyright © 1998-2008 The Brookings Institution, NuTech Solutions, Metascape, LLC All Rights Reserved.