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

Variable Index

 o NULL
The constant for the value "NULL".

Constructor Index

 o Modifier()
Constructs an empty modifier.
 o Modifier(Modifier)
Constructs a modifier that has the same attributes and values as the specified modifier.

Method Index

 o clear()
Clears this modifier so that it contains no attributes.
 o clone()
Returns a clone of this modifier.
 o contains(String)
Tests if the attribute with the specified name is in this modifier.
 o equals(Object)
Compares two objects for equality.
 o get(String)
Returns the value of the attribute with the specified name.
 o hashCode()
Returns a hashcode for this modifier.
 o isEmpty()
Tests if this modifier has no attributes.
 o 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.
 o names()
Returns an enumeration of the names of the attributes in this modifier.
 o put(String, boolean)
Puts a new attribute with the specified name and boolean value.
 o put(String, byte)
Puts a new attribute with the specified name and byte value.
 o put(String, char)
Puts a new attribute with the specified name and character value.
 o put(String, double)
Puts a new attribute with the specified name and double value.
 o put(String, float)
Puts a new attribute with the specified name and float value.
 o put(String, int)
Puts a new attribute with the specified name and integer value.
 o put(String, long)
Puts a new attribute with the specified name and long value.
 o put(String, Object)
Puts a new attribute with the specified name and value.
 o put(String, short)
Puts a new attribute with the specified name and short value.
 o remove(String)
Removes the attribute with the specified name.
 o size()
Returns the size of this modifier, i.e., the number of attributes in this modifier.
 o toString()
Returns a string representation of this modifier.
 o values()
Returns an enumeration of the values of the attributes in this modifier.

Variables

 o NULL
 public static final String NULL
The constant for the value "NULL".

Constructors

 o Modifier
 public Modifier()
Constructs an empty modifier.

 o Modifier
 public Modifier(Modifier modifier)
Constructs a modifier that has the same attributes and values as the specified modifier.

Parameters:
modifier - the modifier.

Methods

 o 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.
 o isEmpty
 public boolean isEmpty()
Tests if this modifier has no attributes.

Returns:
true if this modifier has no attributes; false otherwise.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o put
 public Object put(String name,
                   boolean value)
Puts a new attribute with the specified name and boolean value.

 o put
 public Object put(String name,
                   byte value)
Puts a new attribute with the specified name and byte value.

 o put
 public Object put(String name,
                   char value)
Puts a new attribute with the specified name and character value.

 o put
 public Object put(String name,
                   int value)
Puts a new attribute with the specified name and integer value.

 o put
 public Object put(String name,
                   long value)
Puts a new attribute with the specified name and long value.

 o put
 public Object put(String name,
                   short value)
Puts a new attribute with the specified name and short value.

 o put
 public Object put(String name,
                   float value)
Puts a new attribute with the specified name and float value.

 o put
 public Object put(String name,
                   double value)
Puts a new attribute with the specified name and double value.

 o clear
 public void clear()
Clears this modifier so that it contains no attributes.

 o 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
 o hashCode
 public int hashCode()
Returns a hashcode for this modifier.

Overrides:
hashCode in class Object
 o equals
 public boolean equals(Object anObject)
Compares two objects for equality.

Overrides:
equals in class Object
 o clone
 public Object clone()
Returns a clone of this modifier.

Overrides:
clone in class Object
 o 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