org.iges.util
Class Bounds.Grid

java.lang.Object
  |
  +--org.iges.util.Bounds.Grid
Enclosing class:
Bounds

public static class Bounds.Grid
extends java.lang.Object

Represents a 4-dimensional constraint in grid (relative) coordinates. This class follows the GrADS 1-based indexing convention.


Field Summary
 Range.Long t
           
 Range.Long x
           
 Range.Long y
           
 Range.Long z
           
 
Constructor Summary
Bounds.Grid(long xMin, long xMax, long yMin, long yMax, long zMin, long zMax, long tMin, long tMax)
          Creates a Bounds.Grid object with the constraints given.
Bounds.Grid(Range.Long x, Range.Long y, Range.Long z, Range.Long t)
           
Bounds.Grid(java.lang.String list, boolean zeroBased)
          Creates a Bounds.Grid object from a space-separated string.
 
Method Summary
 boolean equals(Bounds.Grid grid)
           
 long getSize()
          Calculates the number of points in the grid (not size in bytes)
 java.lang.String toGradsString()
          Returns a string representation of the grid bounds, with the indexes offset by one, because GrADS uses one-based array indexing.
 java.lang.String toString()
          Returns a string representation of the grid bounds.
 Bounds.Grid union(Bounds.Grid grid)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

x

public Range.Long x

y

public Range.Long y

z

public Range.Long z

t

public Range.Long t
Constructor Detail

Bounds.Grid

public Bounds.Grid(long xMin,
                   long xMax,
                   long yMin,
                   long yMax,
                   long zMin,
                   long zMax,
                   long tMin,
                   long tMax)
Creates a Bounds.Grid object with the constraints given. No min < max validation is performed.


Bounds.Grid

public Bounds.Grid(Range.Long x,
                   Range.Long y,
                   Range.Long z,
                   Range.Long t)

Bounds.Grid

public Bounds.Grid(java.lang.String list,
                   boolean zeroBased)
            throws java.lang.IllegalArgumentException
Creates a Bounds.Grid object from a space-separated string. The format of the string is "x1 x2 y1 y2 z1 z2 t1 t2". If the zeroBased parameter is true, the string will converted from 0-based to 1-based values (i.e, 1 will be added to each value).

Method Detail

equals

public boolean equals(Bounds.Grid grid)

union

public Bounds.Grid union(Bounds.Grid grid)

getSize

public long getSize()
Calculates the number of points in the grid (not size in bytes)


toGradsString

public java.lang.String toGradsString()
Returns a string representation of the grid bounds, with the indexes offset by one, because GrADS uses one-based array indexing.


toString

public java.lang.String toString()
Returns a string representation of the grid bounds. This representation can be used to create a new Bounds.Grid object.

Overrides:
toString in class java.lang.Object