Package csw.params.commands
Class Observe
- java.lang.Object
-
- csw.params.core.generics.ParameterSetType<Observe>
-
- csw.params.commands.Observe
-
- All Implemented Interfaces:
Command
,ControlCommand
,SequenceCommand
,TMTSerializable
,java.io.Serializable
,scala.Equals
,scala.Product
,scala.Serializable
public class Observe extends ParameterSetType<Observe> implements ControlCommand, scala.Product, scala.Serializable
A parameter set for setting telescope and instrument parameters. Constructor is private to ensure RunId is created internally to guarantee unique value.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Observe(Prefix source, CommandName commandName, java.util.Optional<ObsId> maybeObsId)
A java helper to construct Observe command
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static <P extends Parameter<?>>
Tadd(P parameter)
static Observe
apply(Id runId, Prefix source, CommandName commandName, scala.Option<ObsId> maybeObsId, scala.collection.immutable.Set<Parameter<?>> paramSet)
static Observe
apply(Prefix source, CommandName commandName, scala.Option<ObsId> maybeObsId)
The apply method is used to create Observe command by end-user.static Observe
apply(Prefix source, CommandName commandName, scala.Option<ObsId> maybeObsId, scala.collection.immutable.Set<Parameter<?>> paramSet)
The apply method is used to create Observe command by end-user.abstract static boolean
canEqual(java.lang.Object that)
Observe
cloneCommand()
Create a new Observer instance from an existing instanceCommandName
commandName()
The name of commandstatic boolean
contains(Key<?> key)
protected Observe
create(scala.collection.immutable.Set<Parameter<?>> data)
Create a new Observe instance when a parameter is added or removedprotected static java.lang.String
dataToString()
abstract static boolean
equals(java.lang.Object that)
static <S> boolean
exists(Key<S> key)
static <S> scala.Option<Parameter<S>>
find(Parameter<S> parameter)
static <S> scala.Option<Parameter<S>>
get(Key<S> key)
static <S> scala.Option<Parameter<S>>
get(java.lang.String keyName, KeyType<S> keyType)
static scala.collection.immutable.Map<java.lang.String,java.lang.String>
getStringMap()
static <S> java.util.Optional<Parameter<S>>
jFind(Parameter<S> parameter)
static <S> java.util.Optional<Parameter<S>>
jGet(Key<S> key)
static <S> java.util.Optional<Parameter<S>>
jGet(java.lang.String keyName, KeyType<S> keyType)
static java.util.Map<java.lang.String,java.lang.String>
jGetStringMap()
static java.util.Optional<ObsId>
jMaybeObsId()
static java.util.Set<java.lang.String>
jMissingKeys(Key<?>... keys)
static java.util.Set<java.lang.String>
jMissingKeys(scala.collection.Seq<Key<?>> keys)
static java.util.Set<Parameter<?>>
jParamSet()
static <P extends Parameter<?>>
Tmadd(P... parametersToAdd)
static <P extends Parameter<?>>
Tmadd(scala.collection.immutable.Set<P> parametersToAdd)
static <P extends Parameter<?>>
Tmadd(scala.collection.Seq<P> parametersToAdd)
scala.Option<ObsId>
maybeObsId()
An optional obsId for commandstatic scala.collection.immutable.Set<java.lang.String>
missingKeys(scala.collection.Seq<Key<?>> keys)
static <S> Parameter<S>
parameter(Key<S> key)
scala.collection.immutable.Set<Parameter<?>>
paramSet()
Holds the parameters for this parameter setstatic ParameterSetType<?>
paramType()
abstract static int
productArity()
abstract static java.lang.Object
productElement(int n)
static scala.collection.Iterator<java.lang.Object>
productIterator()
static java.lang.String
productPrefix()
static <S> T
remove(Key<S> key)
static <P extends Parameter<?>>
Tremove(P parameter)
Id
runId()
unique Id for command parameter setstatic int
size()
Prefix
source()
Prefix representing source of the commandstatic java.lang.String
toString()
static java.lang.String
typeName()
-
Methods inherited from class csw.params.core.generics.ParameterSetType
add, apply, contains, dataToString, exists, find, get, get, getStringMap, jFind, jGet, jGet, jGetStringMap, jMissingKeys, jMissingKeys, jParamSet, madd, madd, madd, missingKeys, parameter, remove, remove, size, toString, typeName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface csw.params.commands.Command
jMaybeObsId, paramType, toString, typeName
-
-
-
-
Constructor Detail
-
Observe
public Observe(Prefix source, CommandName commandName, java.util.Optional<ObsId> maybeObsId)
A java helper to construct Observe command- Parameters:
source
- (undocumented)commandName
- (undocumented)maybeObsId
- (undocumented)
-
-
Method Detail
-
apply
public static Observe apply(Id runId, Prefix source, CommandName commandName, scala.Option<ObsId> maybeObsId, scala.collection.immutable.Set<Parameter<?>> paramSet)
-
apply
public static Observe apply(Prefix source, CommandName commandName, scala.Option<ObsId> maybeObsId)
The apply method is used to create Observe command by end-user. runId is not accepted and will be created internally to guarantee unique value.- Parameters:
source
- prefix representing source of the commandcommandName
- the name of the commandmaybeObsId
- an optional obsId for command- Returns:
- a new instance of Observe with auto-generated runId and empty paramSet
-
apply
public static Observe apply(Prefix source, CommandName commandName, scala.Option<ObsId> maybeObsId, scala.collection.immutable.Set<Parameter<?>> paramSet)
The apply method is used to create Observe command by end-user. runId is not accepted and will be created internally to guarantee unique value.- Parameters:
source
- prefix representing source of the commandcommandName
- the name of the commandmaybeObsId
- an optional obsId for commandparamSet
- an initial set of parameters (keys with values)- Returns:
- a new instance of Observe with auto-generated runId
-
typeName
public static java.lang.String typeName()
-
jParamSet
public static java.util.Set<Parameter<?>> jParamSet()
-
size
public static int size()
-
add
public static <P extends Parameter<?>> T add(P parameter)
-
madd
public static <P extends Parameter<?>> T madd(scala.collection.Seq<P> parametersToAdd)
-
madd
public static <P extends Parameter<?>> T madd(scala.collection.immutable.Set<P> parametersToAdd)
-
jGet
public static <S> java.util.Optional<Parameter<S>> jGet(java.lang.String keyName, KeyType<S> keyType)
-
exists
public static <S> boolean exists(Key<S> key)
-
remove
public static <S> T remove(Key<S> key)
-
remove
public static <P extends Parameter<?>> T remove(P parameter)
-
dataToString
protected static java.lang.String dataToString()
-
toString
public static java.lang.String toString()
-
contains
public static boolean contains(Key<?> key)
-
missingKeys
public static scala.collection.immutable.Set<java.lang.String> missingKeys(scala.collection.Seq<Key<?>> keys)
-
jMissingKeys
public static java.util.Set<java.lang.String> jMissingKeys(scala.collection.Seq<Key<?>> keys)
-
getStringMap
public static scala.collection.immutable.Map<java.lang.String,java.lang.String> getStringMap()
-
jGetStringMap
public static java.util.Map<java.lang.String,java.lang.String> jGetStringMap()
-
madd
public static <P extends Parameter<?>> T madd(P... parametersToAdd)
-
jMissingKeys
public static java.util.Set<java.lang.String> jMissingKeys(Key<?>... keys)
-
paramType
public static ParameterSetType<?> paramType()
-
jMaybeObsId
public static java.util.Optional<ObsId> jMaybeObsId()
-
canEqual
public abstract static boolean canEqual(java.lang.Object that)
-
equals
public abstract static boolean equals(java.lang.Object that)
-
productElement
public abstract static java.lang.Object productElement(int n)
-
productArity
public abstract static int productArity()
-
productIterator
public static scala.collection.Iterator<java.lang.Object> productIterator()
-
productPrefix
public static java.lang.String productPrefix()
-
runId
public Id runId()
Description copied from interface:Command
unique Id for command parameter set
-
source
public Prefix source()
Description copied from interface:Command
Prefix representing source of the command
-
commandName
public CommandName commandName()
Description copied from interface:Command
The name of command- Specified by:
commandName
in interfaceCommand
- Returns:
- (undocumented)
-
maybeObsId
public scala.Option<ObsId> maybeObsId()
Description copied from interface:Command
An optional obsId for command- Specified by:
maybeObsId
in interfaceCommand
- Returns:
- (undocumented)
-
paramSet
public scala.collection.immutable.Set<Parameter<?>> paramSet()
Description copied from class:ParameterSetType
Holds the parameters for this parameter set- Specified by:
paramSet
in interfaceCommand
- Specified by:
paramSet
in classParameterSetType<Observe>
- Returns:
- (undocumented)
-
create
protected Observe create(scala.collection.immutable.Set<Parameter<?>> data)
Create a new Observe instance when a parameter is added or removed- Specified by:
create
in classParameterSetType<Observe>
- Parameters:
data
- set of parameters- Returns:
- a new instance of Observe with new runId and provided data
-
cloneCommand
public Observe cloneCommand()
Create a new Observer instance from an existing instance- Returns:
- a new instance of Observe with new runId and copied data
-
-