The Meta-Environment API

toolbus.environment
Class ListBindings

java.lang.Object
  extended by toolbus.environment.ListBindings
All Implemented Interfaces:
Bindings

 class ListBindings
extends java.lang.Object
implements Bindings

ListBindings uses a simple LinkedList to implement the Bindings interface.


Field Summary
private  java.util.LinkedList<Binding> bindings
           
 
Constructor Summary
  ListBindings()
           
protected ListBindings(ListBindings listBindings)
           
 
Method Summary
 Bindings clone()
           
 Binding get(java.lang.String key)
          Return the first binding of for a given key value
 java.util.List<Binding> getBindingsAsList()
          Returns a copy of the content of the bindings as a list.
 void put(java.lang.String key, Binding b)
          Introduce a new (key, binding) pair
 void remove(java.lang.String key)
          Remove the first binding for key
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bindings

private final java.util.LinkedList<Binding> bindings
Constructor Detail

ListBindings

public ListBindings()

ListBindings

protected ListBindings(ListBindings listBindings)
Method Detail

clone

public Bindings clone()
Specified by:
clone in interface Bindings
Overrides:
clone in class java.lang.Object
Returns:
deep (**** qualify this !!! ****) copy of the Bindings object

get

public Binding get(java.lang.String key)
Description copied from interface: Bindings
Return the first binding of for a given key value

Specified by:
get in interface Bindings
Returns:
its binding or null

size

public int size()
Specified by:
size in interface Bindings

put

public void put(java.lang.String key,
                Binding b)
Description copied from interface: Bindings
Introduce a new (key, binding) pair

Specified by:
put in interface Bindings

remove

public void remove(java.lang.String key)
Description copied from interface: Bindings
Remove the first binding for key

Specified by:
remove in interface Bindings

getBindingsAsList

public java.util.List<Binding> getBindingsAsList()
Description copied from interface: Bindings
Returns a copy of the content of the bindings as a list.

Specified by:
getBindingsAsList in interface Bindings
Returns:
A copy of the content of the bindings as a list.

toString

public java.lang.String toString()
Specified by:
toString in interface Bindings
Overrides:
toString in class java.lang.Object
Returns:
a string representation

The Meta-Environment API