org.wamblee.conditions
Class FixedCondition<T>

java.lang.Object
  extended by org.wamblee.conditions.FixedCondition<T>
All Implemented Interfaces:
Condition<T>

public class FixedCondition<T>
extends java.lang.Object
implements Condition<T>

Condition which always returns a fixed value.

Author:
Erik Brakkee

Constructor Summary
FixedCondition(boolean aValue)
          Constructs the condition.
 
Method Summary
 boolean matches(T aObject)
          Determines if an object matches a condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedCondition

public FixedCondition(boolean aValue)
Constructs the condition.

Parameters:
aValue - Fixed value of the condition.
Method Detail

matches

public boolean matches(T aObject)
Description copied from interface: Condition
Determines if an object matches a condition.

Specified by:
matches in interface Condition<T>
Parameters:
aObject - object to match.
Returns:
True iff the object matches.


Copyright © 2010. All Rights Reserved.