com.ibm.etools.logging.util
Class SubstitutionVariable

java.lang.Object
  |
  +--com.ibm.etools.logging.util.SubstitutionVariable

public class SubstitutionVariable
extends java.lang.Object

Licensed Material - Property of IBM (C) Copyright IBM Corp. 2003, 2005 - All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Data structure to hold a key name and a variable which holds the data payload of any type (i.e. Object). CHANGE HISTORY Date Programmer Defect Description -------- ----------------- ------ -------------------------------- 11/08/00 mfaraj@ca.ibm.com initial creation 14/09/01 paules@ca.ibm.com f184021 Added constructors/setters for primative variables. 21/09/01 paules@ca.ibm.com 184234 Added call to LoggingUtilities.objectToString() in toString(), and constructors/setters for bytes and shorts as variable Objects.


Constructor Summary
SubstitutionVariable(java.lang.String key, boolean variable)
          SubstitutionVariable constructor for boolean primitive.
SubstitutionVariable(java.lang.String key, byte variable)
          SubstitutionVariable constructor for byte primitive.
SubstitutionVariable(java.lang.String key, char variable)
          SubstitutionVariable constructor for char primitive.
SubstitutionVariable(java.lang.String key, double variable)
          SubstitutionVariable constructor for double primitive.
SubstitutionVariable(java.lang.String key, float variable)
          SubstitutionVariable constructor for float primitive.
SubstitutionVariable(java.lang.String key, int variable)
          SubstitutionVariable constructor for int primitive.
SubstitutionVariable(java.lang.String key, long variable)
          SubstitutionVariable constructor for long primitive.
SubstitutionVariable(java.lang.String key, java.lang.Object variable)
          SubstitutionVariable constructor for Objects.
SubstitutionVariable(java.lang.String key, short variable)
          SubstitutionVariable constructor for short primitive.
 
Method Summary
 java.lang.String getKey()
          Get the key name
 java.lang.Object getVariable()
          Get the variable object
 void setKey(java.lang.String key)
          Set a new key name
 void setVariable(boolean variable)
          Set a new variable boolean primitive
 void setVariable(byte variable)
          Set a new variable byte primitive
 void setVariable(char variable)
          Set a new variable char primitive
 void setVariable(double variable)
          Set a new variable double primitive
 void setVariable(float variable)
          Set a new variable float primitive
 void setVariable(int variable)
          Set a new variable int primitive
 void setVariable(long variable)
          Set a new variable long primitive
 void setVariable(java.lang.Object variable)
          Set a new variable Object
 void setVariable(short variable)
          Set a new variable short primitive
 java.lang.String toString()
          Object.toString() override
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            boolean variable)
SubstitutionVariable constructor for boolean primitive.

Parameters:
key - name for the variable
variable - boolean variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            char variable)
SubstitutionVariable constructor for char primitive.

Parameters:
key - name for the variable
variable - char variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            byte variable)
SubstitutionVariable constructor for byte primitive.

Parameters:
key - name for the variable
variable - byte variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            short variable)
SubstitutionVariable constructor for short primitive.

Parameters:
key - name for the variable
variable - short variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            int variable)
SubstitutionVariable constructor for int primitive.

Parameters:
key - name for the variable
variable - int variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            long variable)
SubstitutionVariable constructor for long primitive.

Parameters:
key - name for the variable
variable - long variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            float variable)
SubstitutionVariable constructor for float primitive.

Parameters:
key - name for the variable
variable - float variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            double variable)
SubstitutionVariable constructor for double primitive.

Parameters:
key - name for the variable
variable - double variable primitive

SubstitutionVariable

public SubstitutionVariable(java.lang.String key,
                            java.lang.Object variable)
SubstitutionVariable constructor for Objects.

Parameters:
key - name for the variable
variable - Object variables
Method Detail

getKey

public java.lang.String getKey()
Get the key name

Returns:
key name

setKey

public void setKey(java.lang.String key)
Set a new key name


getVariable

public java.lang.Object getVariable()
Get the variable object

Returns:
variable object

setVariable

public void setVariable(boolean variable)
Set a new variable boolean primitive


setVariable

public void setVariable(char variable)
Set a new variable char primitive


setVariable

public void setVariable(byte variable)
Set a new variable byte primitive


setVariable

public void setVariable(short variable)
Set a new variable short primitive


setVariable

public void setVariable(int variable)
Set a new variable int primitive


setVariable

public void setVariable(long variable)
Set a new variable long primitive


setVariable

public void setVariable(float variable)
Set a new variable float primitive


setVariable

public void setVariable(double variable)
Set a new variable double primitive


setVariable

public void setVariable(java.lang.Object variable)
Set a new variable Object


toString

public java.lang.String toString()
Object.toString() override

Overrides:
toString in class java.lang.Object
Returns:
String representation of this class