stella.parameter
Class TargetMerit

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.AbstractTargetParameter
                      extended by stella.parameter.AbstractTargetValue
                          extended by stella.parameter.TargetMerit
All Implemented Interfaces:
Cloneable, ClusterDepending, Parameter, TargetDependingValue, TargetDepending, TargetDependingParameter, TargetProviderDepending, Value, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying

public class TargetMerit
extends AbstractTargetValue
implements TargetProviderDepending, ClusterDepending, Reloadable

A value symbolizing the current merit of the target. It is ClusterDepending to allow proper merit calculation and needs the TargetList parameter to retrieve current observing conditions and the list of all targets.


Nested Class Summary
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
static String DEFNAME
          The default name of this parameter.
private  TargetDefinition forme
          Reference to the target.
private  ParameterClustering set
          The parameter set, already expanded.
private  TargetProviding target
          The parameter list target.
 
Fields inherited from class stella.parameter.AbstractTargetParameter
KEY_INDEX
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
Fields inherited from class util.PropertyBundles
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES
 
Fields inherited from class util.PropertyResources
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset
 
Fields inherited from class util.PropertyContainer
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR
 
Fields inherited from interface util.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
TargetMerit(Map prop)
          Constructs a new target merit.
 
Method Summary
 String getFormattedFor(TargetDefinition td)
          Deviates the formatting to the protected version in AbstractParameter.
 Number getForTarget(TargetDefinition td)
          Returns the merit of the target at the current conditions as a double object.
 Number getValue()
          Returns the value of the current merit.
 void registerCluster(ParameterClustering cluster)
          Registers the parameter cluster.
 void registerProvider(TargetProviding list)
          Registers the parameter cluster and the target list.
 void registerTarget(TargetDefinition forwhat)
          Registers the target.
 double rescanned(String key, String old, String newval)
          Makes this method public, no further changes.
 Number setValue(Number val)
          Sets the airmass of the actual target.
 
Methods inherited from class stella.parameter.AbstractTargetValue
get, set
 
Methods inherited from class stella.parameter.AbstractTargetParameter
getAsStar, getConstant, getSetup
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, register, setName, toString
 
Methods inherited from class util.PropertyBundles
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource
 
Methods inherited from class util.PropertyResources
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet
 
Methods inherited from class util.PropertyContainer
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface util.Reloadable
reload
 
Methods inherited from interface stella.Parameter
getFormatted, getName, getString
 
Methods inherited from interface util.PropertySupplying
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties
 
Methods inherited from interface util.Initializable
init
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

DEFNAME

public static final String DEFNAME
The default name of this parameter.

See Also:
Constant Field Values

target

private TargetProviding target
The parameter list target.


set

private ParameterClustering set
The parameter set, already expanded.


forme

private TargetDefinition forme
Reference to the target.

Constructor Detail

TargetMerit

public TargetMerit(Map prop)
Constructs a new target merit.

Method Detail

rescanned

public double rescanned(String key,
                        String old,
                        String newval)
Makes this method public, no further changes.

Specified by:
rescanned in interface Reloadable
Overrides:
rescanned in class AbstractParameter

registerProvider

public void registerProvider(TargetProviding list)
Registers the parameter cluster and the target list.

Specified by:
registerProvider in interface TargetProviderDepending

registerCluster

public void registerCluster(ParameterClustering cluster)
Registers the parameter cluster.

Specified by:
registerCluster in interface ClusterDepending

registerTarget

public void registerTarget(TargetDefinition forwhat)
Registers the target.

Specified by:
registerTarget in interface TargetDepending

getValue

public Number getValue()
Returns the value of the current merit.

Specified by:
getValue in interface Value

setValue

public Number setValue(Number val)
                throws UnsupportedOperationException
Sets the airmass of the actual target. This is a read-only variable, therefore this method throws an UnsupportedOperationException.

Specified by:
setValue in interface Value
Throws:
UnsupportedOperationException

getForTarget

public Number getForTarget(TargetDefinition td)
Returns the merit of the target at the current conditions as a double object.

Specified by:
getForTarget in interface TargetDependingValue
Specified by:
getForTarget in interface TargetDependingParameter

getFormattedFor

public String getFormattedFor(TargetDefinition td)
Deviates the formatting to the protected version in AbstractParameter.

Specified by:
getFormattedFor in interface TargetDependingParameter
Overrides:
getFormattedFor in class AbstractTargetParameter