All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class AT.Ac.univie.imp.loeffler.util.IntRange1D

java.lang.Object
   |
   +----AT.Ac.univie.imp.loeffler.util.IntRange1D

public class IntRange1D
extends Object
A class to represent a one-diensional range of integer values.

Author:
Gerald Loeffler (Gerald.Loeffler@univie.ac.at)

Constructor Index

 o IntRange1D(int, int)
construct from lower and upper boundary.

Method Index

 o from()
return lower boundary.
 o size()
return the number of integer values lying in the range.
 o to()
return upper boundary.

Constructors

 o IntRange1D
 public IntRange1D(int lower,
                   int upper)
construct from lower and upper boundary.

It is perfectly legal for lower boundary value to be greater then the upper boundary value.

The upper boundary is considered being part of the range.

Parameters:
lower - the lower boundary of the range
upper - the upper boundary of the range

Methods

 o from
 public int from()
return lower boundary.

Returns:
the lower boundary of the range
 o to
 public int to()
return upper boundary.

Returns:
the upper boundary of the range
 o size
 public int size()
return the number of integer values lying in the range.

The size is defined as lower - upper + 1, i.e. the upper boundary is part of the range.

Returns:
the size of the range which is upper - lower + 1

All Packages  Class Hierarchy  This Package  Previous  Next  Index