Public Member Functions | Private Member Functions | Private Attributes

de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore Class Reference

A ValueStore stores the selections specific value of a signal, operation parameter, operation return value, or variable. More...

List of all members.

Public Member Functions

Object get (Collection< ISelection > selectionSet)
 returns the value stored for the given selection set
Collection< IGlobalInstancegetChoicePoints ()
 returns the set of choice points of the key selection sets of the value store
boolean isEmpty ()
Collection< Collection
< ISelection > > 
keySet ()
 getter method for the key set
void put (Collection< ISelection > selectionSet, Object value)
 adds a new entry (selectionSet, value) into the value store
 ValueStore ()
 constructor for an empty value store

Private Member Functions

void completeKeySet (Collection< ISelection > newSelectionSet)
 completes the key set of the value store such that

  • it contains at least one key selection set that contains the newSelectionSet
  • it is complete w.r.t. alternatives of selections in the key selection sets (ie for each selection a in some key selection set and each alternative a' of a there is a key selection set that contains a' instead of a) Old values are taken over to the new keys.

Collection< Collection
< ISelection > > 
selectionClosure (Collection< ISelection > theSelectionSet)
 computes the set of all selection sets that contains the given selection set and is closed under alternatives

Private Attributes

Map< Collection< ISelection >
, Object > 
storeMap
 the map that stores the value in dependency of the selection set

Detailed Description

A ValueStore stores the selections specific value of a signal, operation parameter, operation return value, or variable.

A value store is always complete in the following sense: If it contains a selection set {a, b, c, ...} as key then it also contains all combinations of alternatives of the selections as keys, too. That means: {a', b', c', ...} are also keys in the store for each alternative a' of a, b' of b, c' of c, etc. The put-method is responsible for maintaining this completeness property.

Author:
mgrosse
Version:
0.9.0
Since:
0.9.0

Constructor & Destructor Documentation

de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.ValueStore (  ) 

constructor for an empty value store


Member Function Documentation

void de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.completeKeySet ( Collection< ISelection newSelectionSet  )  [private]

completes the key set of the value store such that

  • it contains at least one key selection set that contains the newSelectionSet
  • it is complete w.r.t. alternatives of selections in the key selection sets (ie for each selection a in some key selection set and each alternative a' of a there is a key selection set that contains a' instead of a) Old values are taken over to the new keys.

Parameters:
newSelectionSet the selection set w.r.t. which the value store is completed
Object de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.get ( Collection< ISelection selectionSet  ) 

returns the value stored for the given selection set

Parameters:
selectionSet the key (argument)
Returns:
the value
Collection<IGlobalInstance> de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.getChoicePoints (  ) 

returns the set of choice points of the key selection sets of the value store

(Each key selection set in the value store has the same choice point due to the completeness of the value store.)

Returns:
the set of choice points of the key selection sets of the value store
boolean de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.isEmpty (  ) 
Collection<Collection<ISelection> > de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.keySet (  ) 

getter method for the key set

Returns:
the selection sets that are keys in the store
void de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.put ( Collection< ISelection selectionSet,
Object  value 
)

adds a new entry (selectionSet, value) into the value store

and thereby keeps the store 'complete'

Parameters:
selectionSet the argument (key) selection set
value the resulting value
Collection<Collection<ISelection> > de.fraunhofer.isst.axbench.operations.simulator.valuestorage.ValueStore.selectionClosure ( Collection< ISelection theSelectionSet  )  [private]

computes the set of all selection sets that contains the given selection set and is closed under alternatives

Parameters:
theSelectionSet a selection set
Returns:
the set of all selection sets that contains the given selection set and is closed under alternatives

Member Data Documentation

the map that stores the value in dependency of the selection set