IBM Rational Software Modeler
Release 6.0

com.ibm.xtools.emf.query.conditions.numbers
Class NumberCondition

java.lang.Object
  extended bycom.ibm.xtools.emf.query.conditions.Condition
      extended bycom.ibm.xtools.emf.query.conditions.numbers.NumberCondition
Direct Known Subclasses:
NumberCondition.ByteValue, NumberCondition.DoubleValue, NumberCondition.FloatValue, NumberCondition.IntegerValue, NumberCondition.LongValue, NumberCondition.ShortValue

public abstract class NumberCondition
extends Condition

A Condition object that tests for numeric arguments. The arguments being evaluated are adapted to a Number first using a NumberAdapter and then compared to the initialization value of this NumberCondition. It evaluates to true when the values are equal or if the value is within the range of supplied lower-bound and upper-bound


Nested Class Summary
static class NumberCondition.ByteValue
          A subclass of NumberCondition to be used to test for byte values Clients can either use the default implementation supplied or have their own.
static class NumberCondition.DoubleValue
          A subclass of NumberCondition to be used to test for double values Clients can either use the default implementation supplied or have their own.
static class NumberCondition.FloatValue
          A subclass of NumberCondition to be used to test for float values Clients can either use the default implementation supplied or have their own.
static class NumberCondition.IntegerValue
          A subclass of NumberCondition to be used to test for integer values Clients can either use the default implementation supplied or have their own.
static class NumberCondition.LongValue
          A subclass of NumberCondition to be used to test for long values Clients can either use the default implementation supplied or have their own.
static class NumberCondition.ShortValue
          A subclass of NumberCondition to be used to test for short values Clients can either use the default implementation supplied or have their own.
 
Field Summary
protected  NumberAdapter adapter
           
protected  Number lowerBound
           
protected  Number upperBound
           
 
Fields inherited from class com.ibm.xtools.emf.query.conditions.Condition
FALSE, TRUE
 
Method Summary
 boolean isSatisfied(byte byteValue)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(Byte byteNumber)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(double doubleValue)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(Double doubleNumber)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(float floatValue)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(Float floatNumber)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(int intValue)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(Integer intNumber)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(long longValue)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(Long longNumber)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(short shortValue)
          Tests if the argument's value equals/in-range the initialization number(s)
 boolean isSatisfied(Short shortNumber)
          Tests if the argument's value equals/in-range the initialization number(s)
 
Methods inherited from class com.ibm.xtools.emf.query.conditions.Condition
AND, EQUIVALENT, IMPLIES, isSatisfied, OR, XOR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

upperBound

protected Number upperBound

lowerBound

protected Number lowerBound

adapter

protected NumberAdapter adapter
Method Detail

isSatisfied

public boolean isSatisfied(Byte byteNumber)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
byteNumber - The Byte object whose value will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(byte byteValue)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
byteValue - The byte value which will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(Double doubleNumber)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
doubleNumber - The Double object whose value will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(double doubleValue)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
doubleValue - The double value which will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(Float floatNumber)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
floatNumber - The Float object whose value will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(float floatValue)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
floatValue - The float value which will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(Integer intNumber)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
intNumber - The Integer object whose value will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(int intValue)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
intValue - The int value which will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(Long longNumber)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
longNumber - The Long object whose value will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(long longValue)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
longValue - The long value which will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(Short shortNumber)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
shortNumber - The Short object whose value will be used in testing
Returns:
true if values are equal/in-range, false otherwise

isSatisfied

public boolean isSatisfied(short shortValue)
Tests if the argument's value equals/in-range the initialization number(s)

Parameters:
shortValue - The short value which will be used in testing
Returns:
true if values are equal/in-range, false otherwise

IBM Rational Software Modeler
Release 6.0


Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2004. All rights reserved.