Class pmr.euclid.Int2Range
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pmr.euclid.Int2Range

java.lang.Object
   |
   +----pmr.euclid.Status
           |
           +----pmr.euclid.Int2Range

public class Int2Range
extends Status

Int2Range - 2-D int limits

Contains two IntRanges. Can therefore be used to describe 2-dimensional limits (e.g. axes of graphs, rectangles in graphics, limits of a molecule, etc.)

Default is two default/invalid IntRange components. Adding points will create valid ranges.

Author:
(C) P. Murray-Rust, 1996

Constructor Index

 o Int2Range()
 o Int2Range(Int2Range)
copy constructor
 o Int2Range(IntRange, IntRange)
initialise with min and max values;

Method Index

 o add(Int2)
add a Int2 to a range
 o equals(Int2Range)
 o getXRange()
get xrange
 o getYRange()
get yrange
 o includes(Int2)
is an Int2 within a Int2Range?
 o includes(Int2Range)
is one Int2Range completely within another?
 o intersectionWith(Int2Range)
intersect two ranges and take the range common to both; return invalid range if no overlap or either is null/invalid
 o isValid()
a Int2Range is valid if both its constituent ranges are
 o plus(Int2Range)
merge two ranges and take the maximum extents
 o toString()

Constructors

 o Int2Range
  public Int2Range()
 o Int2Range
  public Int2Range(IntRange xr,
                   IntRange yr)
initialise with min and max values;
 o Int2Range
  public Int2Range(Int2Range r)
copy constructor

Methods

 o isValid
  public boolean isValid()
a Int2Range is valid if both its constituent ranges are
 o equals
  public boolean equals(Int2Range r2)
 o plus
  public Int2Range plus(Int2Range r2)
merge two ranges and take the maximum extents
 o intersectionWith
  public Int2Range intersectionWith(Int2Range r2)
intersect two ranges and take the range common to both; return invalid range if no overlap or either is null/invalid
 o getXRange
  public IntRange getXRange()
get xrange
 o getYRange
  public IntRange getYRange()
get yrange
 o includes
  public boolean includes(Int2 p)
is an Int2 within a Int2Range?
 o includes
  public boolean includes(Int2Range r)
is one Int2Range completely within another?
 o add
  public void add(Int2 p)
add a Int2 to a range
 o toString
  public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index