|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.braju.format.Parameters
This class makes it possible to simulate parameter lists to method with arbitrary length.
The parameters can be of any datatype or class.
This class was written to be used for the class Format and its printf()-methods, but
it probably useful in other situations as well.
A closely related class is the class ParametersAutoClear. It is an
empty class that can be inserted into the list to mark that
we want the list to be cleared after one usage. It is up to the method
that used the list to do this and to be aware that an object of class
ParametersAutoClear can exists.
Note:Since version 1.3 is this class not subclassing java.lang.Vector.
Format
,
ParametersAutoClear
Constructor Summary | |
Parameters()
Creates an empty parameter list. |
|
Parameters(boolean b)
Creates a parameter list with the given boolean inserted. |
|
Parameters(byte b)
Creates a parameter list with the given byte inserted. |
|
Parameters(char ch)
Creates a parameter list with the given char inserted. |
|
Parameters(double d)
Creates a parameter list with the given double inserted. |
|
Parameters(float f)
Creates a parameter list with the given float inserted. |
|
Parameters(int i)
Creates a parameter list with the given integer inserted. |
|
Parameters(long l)
Creates a parameter list with the given long inserted. |
|
Parameters(java.lang.Object obj)
Creates a parameter list with the given object inserted. |
|
Parameters(short sh)
Creates a parameter list with the given short inserted. |
|
Parameters(java.lang.String s)
Creates a parameter list with the given string inserted. |
|
Parameters(java.util.Vector vector)
Creates a parameter list from a java.util.Vector. |
Method Summary | |
Parameters |
add(boolean b)
Add a boolean to the list. |
Parameters |
add(byte b)
Add an byte to the list. |
Parameters |
add(char ch)
Add a char to the list. |
Parameters |
add(double d)
Add a double to the list. |
Parameters |
add(float f)
Add a float to the list. |
Parameters |
add(int i)
Add an integer to the list. |
Parameters |
add(long l)
Add a long to the list. |
Parameters |
add(java.lang.Object obj)
Add an object to the list. |
Parameters |
add(short sh)
Add an short to the list. |
Parameters |
add(java.lang.String s)
Add a string to the list. |
Parameters |
autoClear(boolean clear)
Place or remove a ParametersAutoClear at the first position. |
Parameters |
clear()
Remove all parameters from the list. |
boolean |
isAutoClear()
Checks if there is a ParameterAutoClear-object at the first position. |
java.util.Vector |
toVector()
Return the list of parameters as a java.util.Vector. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Parameters()
public Parameters(boolean b)
public Parameters(byte b)
public Parameters(char ch)
public Parameters(double d)
public Parameters(float f)
public Parameters(int i)
public Parameters(long l)
public Parameters(java.lang.Object obj)
public Parameters(short sh)
public Parameters(java.lang.String s)
public Parameters(java.util.Vector vector)
Method Detail |
public Parameters add(boolean b)
public Parameters add(byte b)
public Parameters add(char ch)
public Parameters add(double d)
public Parameters add(float f)
public Parameters add(int i)
public Parameters add(long l)
public Parameters add(java.lang.Object obj)
public Parameters add(short sh)
public Parameters add(java.lang.String s)
public Parameters autoClear(boolean clear)
public Parameters clear()
public boolean isAutoClear()
public java.util.Vector toVector()
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |