Class EnergySchemeSet
Object
EnergySchemeSet
- All Implemented Interfaces:
Iterable<SimpleNameValue<EnergyScheme>>
A set of
EnergySchemes, each associated with a unique name.
SharedFeatures are also associated with this set.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionEnergySchemeSet(SharedFeatures sharedFeatures) Creates a newEnergySchemeSetinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(String name, EnergyScheme energyScheme) Adds a newEnergySchemeto the set with the given name.Retrieves anEnergySchemeby 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, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Method Details
-
add
Adds a newEnergySchemeto the set with the given name.- Parameters:
name- the unique name for the energy schemeenergyScheme- theEnergySchemeto add- Returns:
- true if the energy scheme was successfully added
-
get
Retrieves anEnergySchemeby its name.- Parameters:
name- the name of the energy scheme to retrieve- Returns:
- the
SimpleNameValuecontaining the namedEnergyScheme, or null if not found
-
iterator
- Specified by:
iteratorin interfaceIterable<SimpleNameValue<EnergyScheme>>
-