Class EnergySchemeSet
Object
EnergySchemeSet
- All Implemented Interfaces:
Iterable<SimpleNameValue<EnergyScheme>>
A set of
EnergyScheme
s, each associated with a unique name.
SharedFeatures
are also associated with this set.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionEnergySchemeSet
(SharedFeatures sharedFeatures) Creates a newEnergySchemeSet
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(String name, EnergyScheme energyScheme) Adds a newEnergyScheme
to the set with the given name.Retrieves anEnergyScheme
by its name.Shared features associated with all energy schemes in the set.iterator()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Method Details
-
add
Adds a newEnergyScheme
to the set with the given name.- Parameters:
name
- the unique name for the energy schemeenergyScheme
- theEnergyScheme
to add- Returns:
- true if the energy scheme was successfully added
-
get
Retrieves anEnergyScheme
by its name.- Parameters:
name
- the name of the energy scheme to retrieve- Returns:
- the
SimpleNameValue
containing the namedEnergyScheme
, or null if not found
-
iterator
- Specified by:
iterator
in interfaceIterable<SimpleNameValue<EnergyScheme>>
-