edu.ksu.cis.bnj.bbn
Class BBNDiscreteValue

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractSet
          extended byjava.util.HashSet
              extended byjava.util.LinkedHashSet
                  extended byedu.ksu.cis.bnj.bbn.BBNDiscreteValue
All Implemented Interfaces:
BBNValue, java.lang.Cloneable, java.util.Collection, java.io.Serializable, java.util.Set

public class BBNDiscreteValue
extends java.util.LinkedHashSet
implements BBNValue

Set of possible discrete values of a node. E.g.: { yes, no } or { hot, warm, cool, cold }. Essentially a HashSet. We already have contains method, so no need to reimplement anything.

Author:
Roby Joehanes
See Also:
Serialized Form

Constructor Summary
BBNDiscreteValue()
          Inherited constructor for BBNDiscreteValue.
BBNDiscreteValue(java.util.Collection c)
          A shortcut, simply to allow easy cloning
BBNDiscreteValue(int arg0)
          Inherited constructor for BBNDiscreteValue.
BBNDiscreteValue(int arg0, float arg1)
          Inherited constructor for BBNDiscreteValue.
BBNDiscreteValue(java.lang.Object[] c)
          A shortcut, simply to allow easy cloning
 
Method Summary
 java.lang.Object clone()
          Simple cloning
 boolean equals(java.lang.Object o)
          Simple equals
 int getArity()
          A convenience alias to get the arity of the code.
 
Methods inherited from class java.util.HashSet
add, clear, contains, isEmpty, iterator, remove, size
 
Methods inherited from class java.util.AbstractSet
hashCode, removeAll
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.ksu.cis.bnj.bbn.BBNValue
contains
 
Methods inherited from interface java.util.Set
add, addAll, clear, contains, containsAll, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Constructor Detail

BBNDiscreteValue

public BBNDiscreteValue()
Inherited constructor for BBNDiscreteValue.


BBNDiscreteValue

public BBNDiscreteValue(int arg0,
                        float arg1)
Inherited constructor for BBNDiscreteValue.

Parameters:
arg0 -
arg1 -

BBNDiscreteValue

public BBNDiscreteValue(int arg0)
Inherited constructor for BBNDiscreteValue.

Parameters:
arg0 -

BBNDiscreteValue

public BBNDiscreteValue(java.util.Collection c)
A shortcut, simply to allow easy cloning

See Also:
HashSet.HashSet(Collection)

BBNDiscreteValue

public BBNDiscreteValue(java.lang.Object[] c)
A shortcut, simply to allow easy cloning

Parameters:
c -
Method Detail

getArity

public int getArity()
A convenience alias to get the arity of the code. It's the same as size().

Returns:
int

clone

public java.lang.Object clone()
Simple cloning

Specified by:
clone in interface BBNValue
See Also:
Object.clone()

equals

public boolean equals(java.lang.Object o)
Simple equals

Specified by:
equals in interface java.util.Set
See Also:
Object.equals(Object)