|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.AbstractValue
stella.parameter.UserShare
public class UserShare
A parameter that represents the current time share of a user group. It
depends on two StopWatch parameters, one giving the total
observation time of the telescope, and the second giving the
time the telescope was dedicated
to the particular user group. The name of the parameter stems from the
user group it points to KEY_USERTIME, augmented with the
#SHARECURRENT appendix. The stop watch it uses for the user time
is named according to the KEY_USERTIME, augmented with
#SHAREREQUEST. Note that this parameter cannot be set, but its
value is influenced by actions on the two StopWatches it relies on.
Note also that it is in principle possible to assign not the total
observation time of the telescope but rather a different StopWatch
to the user share, using the KEY_TOTALTIME key.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
static String |
CURRENT
The parameter name extension to define current user group total time. |
private static String |
DEFNAME
The default name of the paramter. |
private static String |
DEFTOTALTIME
The default name of the total time stop watch. |
private static DecimalFormat |
df
The formatter for the user share. |
static String |
KEY_TOTALTIME
The key to the unique trigger name. |
static String |
KEY_USERTIME
The key to the unique trigger name. |
static String |
REQUEST
The parameter name extension to define requested user time shares. |
static String |
SHARE
The parameter name extension to define current user time shares. |
private Value |
timetotal
The value counting total observation time of the telescope. |
private StopWatch |
timeuser
The stop watch counting total observation time of a user group. |
| 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 | |
|---|---|
UserShare(Map info)
Constructs a new user share parameter. |
|
| Method Summary | |
|---|---|
Number |
getValue()
Gets the current user group share. |
void |
registerParameter(Parameter add)
Registers an additional parameter to this parameter. |
double |
rescanned(String key,
String old,
String newval)
As any parameter depending instance we fail if the parameter we depend on is now a different one. |
Number |
setValue(Number val)
Sets the current user time share. |
| Methods inherited from class stella.parameter.AbstractValue |
|---|
get, set |
| 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 |
|---|
public static final String CURRENT
public static final String REQUEST
public static final String SHARE
public static final String KEY_TOTALTIME
public static final String KEY_USERTIME
private static final String DEFNAME
private static final String DEFTOTALTIME
private Value timetotal
private StopWatch timeuser
private static final DecimalFormat df
| Constructor Detail |
|---|
public UserShare(Map info)
| Method Detail |
|---|
public double rescanned(String key,
String old,
String newval)
rescanned in interface Reloadablerescanned in class AbstractParameterpublic void registerParameter(Parameter add)
StopWatches, one counting total observation time of the
telescope and another one counting total observation time of a user
group. The total time is identified by its name, KEY_TOTALTIME,
the user group time must have a name according to KEY_USERTIME.
registerParameter in interface ParameterDependingpublic Number getValue()
getValue in interface Value
public Number setValue(Number val)
throws UnsupportedOperationException
setValue in interface ValueUnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||