fr.ifremer.isisfish.simulator.sensitivity.domain
Class DiscreteDomain<E extends Serializable,F extends Serializable>

java.lang.Object
  extended by fr.ifremer.isisfish.simulator.sensitivity.domain.DiscreteDomain<E,F>
Type Parameters:
E - type des valeurs gérées par le domaine
F - type des labels
All Implemented Interfaces:
Domain<E,F>, Serializable

public class DiscreteDomain<E extends Serializable,F extends Serializable>
extends Object
implements Domain<E,F>

Domain discret. Ensemble de valeurs.

Version:
$Revision: 1.0 $ Last update : $Date: 24 févr. 2009 $ By : $Author: chatellier $
Author:
chatellier
See Also:
Serialized Form

Field Summary
protected  SortedMap<F,E> values
          Value for this domain.
 
Constructor Summary
DiscreteDomain()
          Constructor.
 
Method Summary
 void accept(DomainVisitor visitor)
          Accept a new visitor.
 DiscreteDomain<E,F> clone()
          Clone the domain
 E getValueForIdentifier(F identifier)
          Return value associated to identifier.
 SortedMap<F,E> getValues()
          Get domaine values.
 void setValues(SortedMap<F,E> values)
          Set domain values.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

protected SortedMap<F extends Serializable,E extends Serializable> values
Value for this domain. Each "E" values is identified by a Serializable identifier.

Constructor Detail

DiscreteDomain

public DiscreteDomain()
Constructor.

Method Detail

getValues

public SortedMap<F,E> getValues()
Get domaine values.

Returns:
the values

setValues

public void setValues(SortedMap<F,E> values)
Set domain values.

Parameters:
values - the values

getValueForIdentifier

public E getValueForIdentifier(F identifier)
                                             throws IllegalArgumentException
Return value associated to identifier..

Specified by:
getValueForIdentifier in interface Domain<E extends Serializable,F extends Serializable>
Returns:
found value or null if not found
Throws:
IllegalArgumentException - if identifier is not a valid key

accept

public void accept(DomainVisitor visitor)
Accept a new visitor.

Specified by:
accept in interface Domain<E extends Serializable,F extends Serializable>
Parameters:
visitor -

clone

public DiscreteDomain<E,F> clone()
Description copied from interface: Domain
Clone the domain

Specified by:
clone in interface Domain<E extends Serializable,F extends Serializable>
Overrides:
clone in class Object
Returns:
the domain cloned


Copyright © 1999-2010 CodeLutin. All Rights Reserved.