All Packages Class Hierarchy This Package Previous Next Index
Class w3c.tools.store.DoubleAttribute
java.lang.Object
|
+----w3c.tools.store.Attribute
|
+----w3c.tools.store.DoubleAttribute
- public class DoubleAttribute
- extends Attribute
The generic description of an DoubleAttribute.
-
DoubleAttribute(String, Double, int)
- Create a description for a generic Double attribute.
-
checkValue(Object)
- Is the given object a valid DoubleAttribute value ?
-
getPickleLength(Object)
- Get the number of bytes required to save that attribute value.
-
pickle(DataOutputStream, Object)
- Pickle an double to the given output stream.
-
unpickle(DataInputStream)
- Unpickle an integer from the given input stream.
DoubleAttribute
public DoubleAttribute(String name,
Double def,
int flags)
- Create a description for a generic Double attribute.
- Parameters:
- name - The attribute name.
- def - The default value for these attributes.
- flags - The associated flags.
checkValue
public boolean checkValue(Object obj)
- Is the given object a valid DoubleAttribute value ?
- Parameters:
- obj - The object to test.
- Returns:
- A boolean true if okay.
- Throws: IllegalAttributeAccess
- If the provided value doesn't pass the
test.
- Overrides:
- checkValue in class Attribute
getPickleLength
public final int getPickleLength(Object value)
- Get the number of bytes required to save that attribute value.
- Parameters:
- The - value about to be pickled.
- Returns:
- The number of bytes needed to pickle that value.
- Overrides:
- getPickleLength in class Attribute
pickle
public final void pickle(DataOutputStream out,
Object d) throws IOException
- Pickle an double to the given output stream.
- Parameters:
- out - The output stream to pickle to.
- obj - The object to pickle.
- Throws: IOException
- If some IO error occured.
- Overrides:
- pickle in class Attribute
unpickle
public final Object unpickle(DataInputStream in) throws IOException
- Unpickle an integer from the given input stream.
- Parameters:
- in - The input stream to unpickle from.
- Returns:
- An instance of Double.
- Throws: IOException
- If some IO error occured.
- Overrides:
- unpickle in class Attribute
All Packages Class Hierarchy This Package Previous Next Index