All Packages Class Hierarchy This Package Previous Next Index
Class jp.kyasu.graphics.Modifier
java.lang.Object
|
+----jp.kyasu.graphics.Modifier
- public abstract class Modifier
- extends Object
- implements Cloneable, Serializable
The Modifier
class is the abstract base class for all
modifiers which define attributes and values for the modification.
- Version:
- 08 May 1998
- Author:
- Kazuki YASUMATSU
-
NULL
- The constant for the value "NULL".
-
Modifier()
- Constructs an empty modifier.
-
Modifier(Modifier)
- Constructs a modifier that has the same attributes and values as
the specified modifier.
-
clear()
- Clears this modifier so that it contains no attributes.
-
clone()
- Returns a clone of this modifier.
-
contains(String)
- Tests if the attribute with the specified name is in this modifier.
-
equals(Object)
- Compares two objects for equality.
-
get(String)
- Returns the value of the attribute with the specified name.
-
hashCode()
- Returns a hashcode for this modifier.
-
isEmpty()
- Tests if this modifier has no attributes.
-
modify(Modifier)
- Modifies the given modifier, i.e., Creates the modified version
of the given modifier by putting all attributes in this
modifier into the given modifier.
-
names()
- Returns an enumeration of the names of the attributes in this modifier.
-
put(String, boolean)
- Puts a new attribute with the specified name and boolean value.
-
put(String, byte)
- Puts a new attribute with the specified name and byte value.
-
put(String, char)
- Puts a new attribute with the specified name and character value.
-
put(String, double)
- Puts a new attribute with the specified name and double value.
-
put(String, float)
- Puts a new attribute with the specified name and float value.
-
put(String, int)
- Puts a new attribute with the specified name and integer value.
-
put(String, long)
- Puts a new attribute with the specified name and long value.
-
put(String, Object)
- Puts a new attribute with the specified name and value.
-
put(String, short)
- Puts a new attribute with the specified name and short value.
-
remove(String)
- Removes the attribute with the specified name.
-
size()
- Returns the size of this modifier, i.e., the number of attributes
in this modifier.
-
toString()
- Returns a string representation of this modifier.
-
values()
- Returns an enumeration of the values of the attributes in this modifier.
NULL
public static final String NULL
- The constant for the value "NULL".
Modifier
public Modifier()
- Constructs an empty modifier.
Modifier
public Modifier(Modifier modifier)
- Constructs a modifier that has the same attributes and values as
the specified modifier.
- Parameters:
- modifier - the modifier.
size
public int size()
- Returns the size of this modifier, i.e., the number of attributes
in this modifier.
- Returns:
- the size of this modifier.
isEmpty
public boolean isEmpty()
- Tests if this modifier has no attributes.
- Returns:
-
true
if this modifier has no attributes;
false
otherwise.
names
public Enumeration names()
- Returns an enumeration of the names of the attributes in this modifier.
- Returns:
- an enumeration of the names of the attributes in this modifier.
values
public Enumeration values()
- Returns an enumeration of the values of the attributes in this modifier.
- Returns:
- an enumeration of the values of the attributes in this modifier.
contains
public boolean contains(String name)
- Tests if the attribute with the specified name is in this modifier.
- Parameters:
- name - the name of the attribute.
- Returns:
-
true
if the attribute with the specified name
is in this modifier; false
otherwise.
get
public Object get(String name)
- Returns the value of the attribute with the specified name.
- Parameters:
- name - the name of the attribute.
- Returns:
- the value of the attribute with the specified name;
null
if the attribute is not defined.
remove
public Object remove(String name)
- Removes the attribute with the specified name.
- Parameters:
- name - the name of the attribute.
- Returns:
- the previous value of the attribute with the specified name;
null
if the attribute is not defined.
put
public Object put(String name,
Object value)
- Puts a new attribute with the specified name and value.
- Parameters:
- name - the name of the attribute.
- value - the value of the attribute.
- Returns:
- the previous value of the attribute with the specified name;
null
if the attribute is not defined.
put
public Object put(String name,
boolean value)
- Puts a new attribute with the specified name and boolean value.
put
public Object put(String name,
byte value)
- Puts a new attribute with the specified name and byte value.
put
public Object put(String name,
char value)
- Puts a new attribute with the specified name and character value.
put
public Object put(String name,
int value)
- Puts a new attribute with the specified name and integer value.
put
public Object put(String name,
long value)
- Puts a new attribute with the specified name and long value.
put
public Object put(String name,
short value)
- Puts a new attribute with the specified name and short value.
put
public Object put(String name,
float value)
- Puts a new attribute with the specified name and float value.
put
public Object put(String name,
double value)
- Puts a new attribute with the specified name and double value.
clear
public void clear()
- Clears this modifier so that it contains no attributes.
modify
public Modifier modify(Modifier modifier)
- Modifies the given modifier, i.e., Creates the modified version
of the given modifier by putting all attributes in this
modifier into the given modifier. If the value of the attribute
to be put is "NULL", removes the corresponding attribute from
the given modifier.
- Parameters:
- modifier - the given modifier.
- Returns:
- the modified version of the given modifier; or the given
modifier, if the modification has no effect on the given
modifier.
- See Also:
- NULL
hashCode
public int hashCode()
- Returns a hashcode for this modifier.
- Overrides:
- hashCode in class Object
equals
public boolean equals(Object anObject)
- Compares two objects for equality.
- Overrides:
- equals in class Object
clone
public Object clone()
- Returns a clone of this modifier.
- Overrides:
- clone in class Object
toString
public String toString()
- Returns a string representation of this modifier.
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index