Package csw.params.core.generics
Class ParameterSetFilters
java.lang.Object
csw.params.core.generics.ParameterSetFilters
A collection of Utility functions for filtering Commands and Parameters from an input sequence
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic scala.collection.immutable.Seq<Observe>
onlyObserves
(scala.collection.immutable.Seq<SequenceCommand> sequenceCommands) Gives only Observe type of commands from given Seq of SequenceCommandstatic scala.collection.immutable.Seq<Setup>
onlySetups
(scala.collection.immutable.Seq<SequenceCommand> sequenceCommands) Gives only Setup type of commands from given Seq of SequenceCommandstatic scala.collection.immutable.Seq<Wait>
onlyWaits
(scala.collection.immutable.Seq<SequenceCommand> sequenceCommands) Gives only Wait type of commands from given Seq of SequenceCommandstatic scala.collection.immutable.Seq<ParameterSetKeyData>
prefixContains
(String query, scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives a Seq of ParameterSetKeyData for which the prefix contains with given querystatic scala.collection.immutable.Set<String>
prefixes
(scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives only prefixes from given Seq of ParameterSetKeyDatastatic scala.collection.immutable.Seq<ParameterSetKeyData>
prefixIsSubsystem
(Subsystem query, scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives a Seq of ParameterSetKeyData for which the prefix contains with given querystatic scala.collection.immutable.Seq<ParameterSetKeyData>
prefixStartsWith
(String query, scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives a Seq of ParameterSetKeyData for which the prefix starts with given query
-
Constructor Details
-
ParameterSetFilters
public ParameterSetFilters()
-
-
Method Details
-
prefixes
public static scala.collection.immutable.Set<String> prefixes(scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives only prefixes from given Seq of ParameterSetKeyData- Parameters:
paramSets
- a Seq of ParameterSetKeyData- Returns:
- a Set of prefixes
-
onlySetups
public static scala.collection.immutable.Seq<Setup> onlySetups(scala.collection.immutable.Seq<SequenceCommand> sequenceCommands) Gives only Setup type of commands from given Seq of SequenceCommand- Parameters:
sequenceCommands
- a Seq of SequenceCommand- Returns:
- a Seq of Setup commands
-
onlyObserves
public static scala.collection.immutable.Seq<Observe> onlyObserves(scala.collection.immutable.Seq<SequenceCommand> sequenceCommands) Gives only Observe type of commands from given Seq of SequenceCommand- Parameters:
sequenceCommands
- a Seq of SequenceCommand- Returns:
- a Seq of Observe commands
-
onlyWaits
public static scala.collection.immutable.Seq<Wait> onlyWaits(scala.collection.immutable.Seq<SequenceCommand> sequenceCommands) Gives only Wait type of commands from given Seq of SequenceCommand- Parameters:
sequenceCommands
- a Seq of SequenceCommand- Returns:
- a Seq of Wait commands
-
prefixStartsWith
public static scala.collection.immutable.Seq<ParameterSetKeyData> prefixStartsWith(String query, scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives a Seq of ParameterSetKeyData for which the prefix starts with given query- Parameters:
query
- a String to which the prefix is matched at the beginningparamSets
- a Seq of ParameterSetKeyData- Returns:
- a filtered Seq of ParameterSetKeyData
-
prefixContains
public static scala.collection.immutable.Seq<ParameterSetKeyData> prefixContains(String query, scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives a Seq of ParameterSetKeyData for which the prefix contains with given query- Parameters:
query
- a String to which the prefix is matched anywhere in the wordparamSets
- a Seq of ParameterSetKeyData- Returns:
- a filtered Seq of ParameterSetKeyData
-
prefixIsSubsystem
public static scala.collection.immutable.Seq<ParameterSetKeyData> prefixIsSubsystem(Subsystem query, scala.collection.immutable.Seq<ParameterSetKeyData> paramSets) Gives a Seq of ParameterSetKeyData for which the prefix contains with given query- Parameters:
query
- a String to which the prefix is matched exactly withparamSets
- a Seq of ParameterSetKeyData- Returns:
- a filtered Seq of ParameterSetKeyData
-