Qizx/Open v0.3

net.xfra.qizxopen.util
Class Bound

java.lang.Object
  |
  +--net.xfra.qizxopen.util.Bound
Direct Known Subclasses:
Bound.Numeric, Bound.StringBound

public abstract class Bound
extends java.lang.Object

Represents a comparison on a numeric or string value. Static factory methods return Bounds of different kinds (implemented by nested subclasses).


Nested Class Summary
static class Bound.NumberGE
           
static class Bound.NumberGT
           
static class Bound.NumberLE
           
static class Bound.NumberLT
           
static class Bound.Numeric
           
static class Bound.StringBound
           
static class Bound.StringGE
           
static class Bound.StringGT
           
static class Bound.StringLE
           
static class Bound.StringLT
           
 
Constructor Summary
Bound()
           
 
Method Summary
static Bound GE(double value)
          returns a Bound matching numbers greater-than-or-equal-to the specified value.
static Bound GE(java.lang.String value)
          returns a Bound matching strings greater-than-or-equal-to the specified value.
static Bound GT(double value)
          returns a Bound matching numbers greater-than the specified value.
static Bound GT(java.lang.String value)
          returns a Bound matching strings greater-than the specified value.
abstract  boolean isNumeric()
           
 boolean isStrict()
           
static Bound LE(double value)
          returns a Bound matching numbers less-than-or-equal-to the specified value.
static Bound LE(java.lang.String value)
          returns a Bound matching strings less-than-or-equal-to the specified value.
static Bound LT(double value)
          returns a new Bound matching numbers less-than the specified value.
static Bound LT(java.lang.String value)
          returns a new Bound matching strings less-than the specified value.
 double numericValue()
           
 java.lang.String stringValue()
           
abstract  boolean test(double value)
          Tests a numeric value against this Bound.
abstract  boolean test(java.lang.String value)
          Tests a String value against this Bound.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Bound

public Bound()
Method Detail

isStrict

public boolean isStrict()

test

public abstract boolean test(double value)
Tests a numeric value against this Bound.

Throws:
java.lang.IllegalArgumentException - if not a numeric Bound.

test

public abstract boolean test(java.lang.String value)
Tests a String value against this Bound.

Throws:
java.lang.IllegalArgumentException - if not a String Bound.

isNumeric

public abstract boolean isNumeric()

stringValue

public java.lang.String stringValue()

numericValue

public double numericValue()

LT

public static Bound LT(double value)
returns a new Bound matching numbers less-than the specified value.


LE

public static Bound LE(double value)
returns a Bound matching numbers less-than-or-equal-to the specified value.


GE

public static Bound GE(double value)
returns a Bound matching numbers greater-than-or-equal-to the specified value.


GT

public static Bound GT(double value)
returns a Bound matching numbers greater-than the specified value.


LT

public static Bound LT(java.lang.String value)
returns a new Bound matching strings less-than the specified value.


LE

public static Bound LE(java.lang.String value)
returns a Bound matching strings less-than-or-equal-to the specified value.


GE

public static Bound GE(java.lang.String value)
returns a Bound matching strings greater-than-or-equal-to the specified value.


GT

public static Bound GT(java.lang.String value)
returns a Bound matching strings greater-than the specified value.


 Copyright Xavier FRANC 2003-2004