Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.

fj.test
Class Bool

java.lang.Object
  extended by fj.test.Bool

public final class Bool
extends Object

A boolean wrapper that works well with properties.


Method Summary
static Bool bool(boolean b)
          Construct a Bool from the given value.
 Property implies(Bool c)
          Returns a property that produces a result only if this value is true.
 Property implies(boolean c)
          Returns a property that produces a result only if this value is true.
 Property implies(P1<Property> p)
          Returns a property that produces a result only if this value is true.
 Property implies(Property p)
          Returns a property that produces a result only if this value is true.
 boolean is()
          Returns true if this value is true, false otherwise.
 boolean isNot()
          Returns false if this value is true, true otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

is

public boolean is()
Returns true if this value is true, false otherwise.

Returns:
true if this value is true, false otherwise.

isNot

public boolean isNot()
Returns false if this value is true, true otherwise.

Returns:
false if this value is true, true otherwise.

implies

public Property implies(P1<Property> p)
Returns a property that produces a result only if this value is true. The result will be taken from the given property.

Parameters:
p - The property to return if this value is true.
Returns:
a property that produces a result only if this value is true.

implies

public Property implies(Property p)
Returns a property that produces a result only if this value is true. The result will be taken from the given property.

Parameters:
p - The property to return if this value is true.
Returns:
a property that produces a result only if this value is true.

implies

public Property implies(Bool c)
Returns a property that produces a result only if this value is true.

Parameters:
c - The value to construct a property with to return if this value is true.
Returns:
a property that produces a result only if this value is true.

implies

public Property implies(boolean c)
Returns a property that produces a result only if this value is true.

Parameters:
c - The value to construct a property with to return if this value is true.
Returns:
a property that produces a result only if this value is true.

bool

public static Bool bool(boolean b)
Construct a Bool from the given value.

Parameters:
b - The value to construct a Bool with.
Returns:
A Bool from the given value.

Copyright 2008 - 2009 Tony Morris, Runar Bjarnason, Tom Adams, Brad Clow, Ricky Clarkson, Nick Partridge, Jason Zaugg

This software is released under an open source BSD licence.