MATES 3.0-rc2

org.mates.util
Class Bounds

java.lang.Object
  extended byorg.mates.util.Bounds
Direct Known Subclasses:
BoundingBox

public class Bounds
extends java.lang.Object

Class for defining the bounds on a region

Author:
Evan Sultanik
See Also:
Position

Constructor Summary
Bounds()
          Creates a new Bounds object.
 
Method Summary
 Position closestValidPosition(Position position)
          Returns the closest position to position that is within the bounds.
 boolean contains(Position position)
          Returns true if the region defined by the bounds contains position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bounds

public Bounds()
Creates a new Bounds object.

Method Detail

contains

public boolean contains(Position position)
Returns true if the region defined by the bounds contains position. The default implementation of this function always returns true.


closestValidPosition

public Position closestValidPosition(Position position)
Returns the closest position to position that is within the bounds. If no such position is available, null is returned.


MATES 3.0-rc2

Submit a bug or request a feature
http://mates.sourceforge.net/

Copyright 2004 Evan Sultanik