|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.hd.d.pg2k.svrCore.location.Location.ValueAndBounds
public abstract static class Location.ValueAndBounds
Base class of location value with error bounds. The value is the mid-point of range of the value, and the error is the width of the interval, ON EITHER SIDE OF the value (the mid-point), encompassing both any actual `duration' or `size' of the item and any error or uncertainty in the value. Thus the value can be shown as +/- the error.
The error values returned must always be non-negative (zero is allowed).
This abstract class can be derived to store the units in various forms. All derived classes must be immutable, so we will only allow it to be constructed by well-behaved sub-classes that use guaranteed-immutable Number args, and that also ensure that the error value is non-negative.
This and any deriving classes should be immutable, serialisable, and support equals() and hashCode().
TODO: should validate on deserialisation.
| Field Summary | |
|---|---|
java.lang.Number |
error
Error bounds; never null. |
private static long |
serialVersionUID
Unique Serialisation class ID generated by http://random.hd.org/. |
java.lang.Number |
value
Central value; never null. |
| Constructor Summary | |
|---|---|
Location.ValueAndBounds(java.lang.Number v,
java.lang.Number e)
Construct a new value. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Depends on equality of value and error. |
int |
hashCode()
Currently depends on only value for speed. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.Number value
public final java.lang.Number error
private static final long serialVersionUID
| Constructor Detail |
|---|
Location.ValueAndBounds(java.lang.Number v,
java.lang.Number e)
| Method Detail |
|---|
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object
|
DHD Multimedia Gallery V1.57.21 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||