org.jscience.mathematics.algebraic.lattices
Class BooleanLogic

java.lang.Object
  extended by org.jscience.mathematics.algebraic.lattices.BooleanLogic
All Implemented Interfaces:
BooleanAlgebra, JoinSemiLattice, Lattice, MeetSemiLattice

public final class BooleanLogic
extends java.lang.Object
implements BooleanAlgebra

The BooleanLattice class encapsulates the tradionnal boolean algebra.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jscience.mathematics.algebraic.lattices.BooleanAlgebra
BooleanAlgebra.Member
 
Field Summary
static Boolean FALSE
          DOCUMENT ME!
static Boolean TRUE
          DOCUMENT ME!
 
Method Summary
static BooleanLogic getInstance()
          Constructs a algebra of boolean logic numbers.
 boolean isComplement(BooleanAlgebra.Member a, BooleanAlgebra.Member b)
          Returns true if one boolean number is the negative of the other.
 boolean isOne(JoinSemiLattice.Member g)
          Returns true if the boolean number is equal to one, also named true.
 boolean isZero(MeetSemiLattice.Member g)
          Returns true if the boolean number is equal to zero, also named false.
 JoinSemiLattice.Member one()
          Returns the boolean number one.
 MeetSemiLattice.Member zero()
          Returns the boolean number zero.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FALSE

public static final Boolean FALSE
DOCUMENT ME!


TRUE

public static final Boolean TRUE
DOCUMENT ME!

Method Detail

getInstance

public static final BooleanLogic getInstance()
Constructs a algebra of boolean logic numbers. Singleton.

Returns:
DOCUMENT ME!

zero

public MeetSemiLattice.Member zero()
Returns the boolean number zero.

Specified by:
zero in interface MeetSemiLattice
Returns:
DOCUMENT ME!

isZero

public boolean isZero(MeetSemiLattice.Member g)
Returns true if the boolean number is equal to zero, also named false.

Specified by:
isZero in interface MeetSemiLattice
Parameters:
g - DOCUMENT ME!
Returns:
DOCUMENT ME!

one

public JoinSemiLattice.Member one()
Returns the boolean number one.

Specified by:
one in interface JoinSemiLattice
Returns:
DOCUMENT ME!

isOne

public boolean isOne(JoinSemiLattice.Member g)
Returns true if the boolean number is equal to one, also named true.

Specified by:
isOne in interface JoinSemiLattice
Parameters:
g - DOCUMENT ME!
Returns:
DOCUMENT ME!

isComplement

public boolean isComplement(BooleanAlgebra.Member a,
                            BooleanAlgebra.Member b)
Returns true if one boolean number is the negative of the other.

Parameters:
a - DOCUMENT ME!
b - DOCUMENT ME!
Returns:
DOCUMENT ME!