se.js.jesdob.query.condition
Class EqualsCondition

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

public class EqualsCondition
extends java.lang.Object
implements ICondition

A Condition for checking if an IDob contains a specific attribute, and if the value equals a specific value.


Constructor Summary
EqualsCondition(java.lang.String attribute, java.lang.String value)
          Constructor.
 
Method Summary
 boolean isTrue(IDob dob)
          This condition will check if the dob has a specific attribute, and if this attribute has got a specific value or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqualsCondition

public EqualsCondition(java.lang.String attribute,
                       java.lang.String value)
Constructor.

Parameters:
attribute - The attribute we want to check.
value - The numeric value we want to check if the attribute equals.
Method Detail

isTrue

public boolean isTrue(IDob dob)
This condition will check if the dob has a specific attribute, and if this attribute has got a specific value or not. If the dob has not the attribute, the condition will return false. If the dob has the attribute, but the value of the attribute is not the supplied value, the condition will return false. If the dob has the attribute, and the value equals the supplied value, the condition will return true.

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.