|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--com.jdc.lang.Object
|
+--com.jdc.lang.ToString
ToString is a utility class used to create a toString
representation of an object. The caller may specify a object title as well
as any number of object attributes.
String returned (by the ToString method toString)
will have the format:
title
{
attribute = value
attribute = value
attribute = value
. . .
}
| Field Summary |
| Fields inherited from class com.jdc.lang.Object |
string |
| Constructor Summary | |
ToString()
Constructs a new ToString object. |
|
ToString(int indentLevel)
Constructs a new ToString object with the specified indentation
level. |
|
ToString(Object object)
Constructs a new ToString object for the specified object. |
|
| Method Summary | |
void |
addAttribute(String attribute)
Adds a toString attribute line. |
void |
addAttribute(String attribute,
boolean value)
Adds a toString attribute line for the specified attribute and
boolean value. |
void |
addAttribute(String attribute,
int value)
Adds a toString attribute line for the specified attribute and
int value. |
void |
addAttribute(String attribute,
String value)
Adds a toString attribute line for the specified attribute and
String value. |
void |
addTitle(Object object)
Adds a toString title line with the specified object Class
name. |
void |
addTitle(String title)
Adds a toString title line. |
String |
toString()
Returns a toString representation for an object.. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ToString()
ToString object.
public ToString(int indentLevel)
ToString object with the specified indentation
level.
public ToString(Object object)
ToString object for the specified object.
| Method Detail |
public void addAttribute(String attribute)
toString attribute line.
public void addAttribute(String attribute,
boolean value)
toString attribute line for the specified attribute and
boolean value.
public void addAttribute(String attribute,
int value)
toString attribute line for the specified attribute and
int value.
public void addAttribute(String attribute,
String value)
toString attribute line for the specified attribute and
String value.
public void addTitle(String title)
toString title line.
public void addTitle(Object object)
toString title line with the specified object Class
name.
public String toString()
toString representation for an object..
toString in class ObjecttoString representation for an object.
|
2004.04.29 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||