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  2D int limits
Contains two IntRanges. Can therefore be used to describe 2dimensional
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. MurrayRust, 1996

Int2Range()


Int2Range(Int2Range)
 copy constructor

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

add(Int2)
 add a Int2 to a range

equals(Int2Range)


getXRange()
 get xrange

getYRange()
 get yrange

includes(Int2)
 is an Int2 within a Int2Range?

includes(Int2Range)
 is one Int2Range completely within another?

intersectionWith(Int2Range)
 intersect two ranges and take the range common to both; return invalid
range if no overlap or either is null/invalid

isValid()
 a Int2Range is valid if both its constituent ranges are

plus(Int2Range)
 merge two ranges and take the maximum extents

toString()

Int2Range
public Int2Range()
Int2Range
public Int2Range(IntRange xr,
IntRange yr)
 initialise with min and max values;
Int2Range
public Int2Range(Int2Range r)
 copy constructor
isValid
public boolean isValid()
 a Int2Range is valid if both its constituent ranges are
equals
public boolean equals(Int2Range r2)
plus
public Int2Range plus(Int2Range r2)
 merge two ranges and take the maximum extents
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
getXRange
public IntRange getXRange()
 get xrange
getYRange
public IntRange getYRange()
 get yrange
includes
public boolean includes(Int2 p)
 is an Int2 within a Int2Range?
includes
public boolean includes(Int2Range r)
 is one Int2Range completely within another?
add
public void add(Int2 p)
 add a Int2 to a range
toString
public String toString()
 Overrides:
 toString in class Object
All Packages Class Hierarchy This Package Previous Next Index