|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.cilib.type.types.Blackboard<K,V>
K - The key type.V - The value type.public class Blackboard<K,V extends Type>
Simple Blackboard implementation.
| Constructor Summary | |
|---|---|
Blackboard()
Create a new empty Blackboard container. |
|
Blackboard(Blackboard<K,V> copy)
Copy constructor. |
|
| Method Summary | |
|---|---|
Set<Map.Entry<K,V>> |
entrySet()
Obtain a Set of key / value pairs. |
boolean |
equals(Object obj)
Compare the specified object with this type for equality. |
V |
get(K key)
Get the value associated with the provided key, null otherwise. |
Blackboard<K,V> |
getClone()
Create a cloned copy of the current object and return it. |
int |
hashCode()
Returns the hash code value for this list. |
V |
put(K key,
V value)
Put the provided key / value pair into the Blackboard. |
void |
reset()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Blackboard()
Blackboard container.
public Blackboard(Blackboard<K,V> copy)
copy - The isntance to copy.| Method Detail |
|---|
public Blackboard<K,V> getClone()
getClone in interface TypegetClone in interface CloneableObject.clone()public boolean equals(Object obj)
true if and only if the specified object is also an instance
of the same type.
equals in interface Typeequals in class Objectobj - The object to compare.
true if equality exists, false otherwise.Object.equals(Object)public int hashCode()
int hashCode = 7;
Iterator<E> i = list.iterator();
while (i.hasNext()) {
E obj = i.next();
hashCode = 31*hashCode + (obj==null ? 0 : obj.hashCode());
}
This ensures that type1.equals(type2) implies that
type1.hashCode()==type2.hashCode() for any two types,
type1 and type2, as required by the general
contract of Object.hashCode().
hashCode in interface TypehashCode in class ObjectObject.equals(Object),
Type.equals(Object)public void reset()
public String toString()
toString in class Object
public V put(K key,
V value)
Blackboard.
key - The key value for the pair.value - The value associated with the key.
public V get(K key)
null otherwise.
key - The key to obtained the value of.
public Set<Map.Entry<K,V>> entrySet()
Set of key / value pairs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||