se.js.jesdob.query.condition
Class LesserOrEqualToCondition

java.lang.Object
  extended by se.js.jesdob.query.condition.NumericCondition
      extended by se.js.jesdob.query.condition.LesserOrEqualToCondition
All Implemented Interfaces:
ICondition

public class LesserOrEqualToCondition
extends NumericCondition
implements ICondition

A Condition for checking if a IDob contains a specific attribute, and if the value of this attribute is numeric and lesser or equal to a specific value.


Constructor Summary
LesserOrEqualToCondition(java.lang.String attribute, double value)
          Constructor.
 
Method Summary
 boolean isTrue(IDob dob)
          This condition will check if a specific numerical attribute is lesser than, or equal to, a specific value.
 
Methods inherited from class se.js.jesdob.query.condition.NumericCondition
getNumeric, isNumeric
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LesserOrEqualToCondition

public LesserOrEqualToCondition(java.lang.String attribute,
                                double value)
Constructor.

Parameters:
attribute - The attribute we want to check.
value - The numeric value we want to check if the attribute is lesser than, or equal to.
Method Detail

isTrue

public boolean isTrue(IDob dob)
This condition will check if a specific numerical attribute is lesser than, or equal to, a specific value. If the dob has not the attribute, the condition will return false. If the dob has the attribute, and the value is lesser than supplied value, the condition will return true. If the dob has the attribute, and the value equals the supplied value, the condition will return true. If the dob has the attribute, and the value is bigger the supplied value, the condition will return false.

Specified by:
isTrue in interface ICondition
Parameters:
dob - The IDob to test.
Returns:
True or false, depending on if the condition is true for the IDob-object or not.