Package csw.params.core.generics
Class ParameterSetFilters
- java.lang.Object
-
- csw.params.core.generics.ParameterSetFilters
-
public class ParameterSetFilters extends java.lang.Object
A collection of Utility functions for filtering Commands and Parameters from an input sequence
-
-
Constructor Summary
Constructors Constructor Description ParameterSetFilters()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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(java.lang.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<java.lang.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(java.lang.String query, scala.collection.immutable.Seq<ParameterSetKeyData> paramSets)
Gives a Seq of ParameterSetKeyData for which the prefix starts with given query
-
-
-
Method Detail
-
prefixes
public static scala.collection.immutable.Set<java.lang.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(java.lang.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(java.lang.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
-
-