it.geosolutions.jaiext.range
Class Range

java.lang.Object
  extended by it.geosolutions.jaiext.range.Range
Direct Known Subclasses:
RangeByte, RangeDouble, RangeFloat, RangeInt, RangeLong, RangeShort, RangeUshort

public abstract class Range
extends Object

Abstract class used for checking if a selected value is inside the selected Range. All the methods throw an UnsupportedOperationException but for every subclass one of these methods is overridden with the correct functionality. These 6 methods are different only for the data type used. In this way it is possible to reach a better performance by using primitive variables than generic. All the subclasses can contain a Range composed by a minimum and a maximum or a single-point Range. For Double and Float data type the NaN data can be used only with a single-point Range.


Nested Class Summary
static class Range.DataType
           
 
Constructor Summary
Range()
           
 
Method Summary
 boolean contains(byte value)
          Method for checking if a byte value is contained inside the Range
 boolean contains(double value)
          Method for checking if a double value is contained inside the Range
 boolean contains(float value)
          Method for checking if a float value is contained inside the Range
 boolean contains(int value)
          Method for checking if an integer value is contained inside the Range
 boolean contains(long value)
          Method for checking if a long value is contained inside the Range
 boolean contains(short value)
          Method for checking if a short/ushort value is contained inside the Range
<T extends Number & Comparable<T>>
boolean
contains(T value)
          Method for checking if a Generic value is contained inside the Range
abstract  Range.DataType getDataType()
          Returns the Range data Type
abstract  Number getMax()
          Returns the maximum bound of the Range
abstract  Number getMin()
          Returns the minimum bound of the Range
abstract  boolean isPoint()
          Indicates if the Range is a degenerated single point Range or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Range

public Range()
Method Detail

contains

public boolean contains(byte value)
Method for checking if a byte value is contained inside the Range


contains

public boolean contains(short value)
Method for checking if a short/ushort value is contained inside the Range


contains

public boolean contains(int value)
Method for checking if an integer value is contained inside the Range


contains

public boolean contains(float value)
Method for checking if a float value is contained inside the Range


contains

public boolean contains(double value)
Method for checking if a double value is contained inside the Range


contains

public boolean contains(long value)
Method for checking if a long value is contained inside the Range


contains

public <T extends Number & Comparable<T>> boolean contains(T value)
Method for checking if a Generic value is contained inside the Range


getDataType

public abstract Range.DataType getDataType()
Returns the Range data Type


isPoint

public abstract boolean isPoint()
Indicates if the Range is a degenerated single point Range or not


getMax

public abstract Number getMax()
Returns the maximum bound of the Range


getMin

public abstract Number getMin()
Returns the minimum bound of the Range



Copyright © 2006–2015 GeoSolutions. All rights reserved.