Class Address
java.lang.Object
|
+--Address
- Direct Known Subclasses:
- Address2Line
- public class Address
- extends java.lang.Object
- implements java.io.Serializable
A simple class for address data, to illustrate using a Java class
as an SQL datatype.
- See Also:
- Serialized Form
Field Summary |
java.lang.String |
street
The street data for the address. |
java.lang.String |
zip
The zipcode data for the address. |
Constructor Summary |
Address()
A default constructor. |
Address(java.lang.String S,
java.lang.String Z)
A constructor with parameters. |
Method Summary |
java.lang.String |
display()
A method to return a display of the address data. |
void |
removeLeadingBlanks()
A void method to remove leading blanks. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
street
public java.lang.String street
- The street data for the address.
zip
public java.lang.String zip
- The zipcode data for the address.
Address
public Address()
- A default constructor.
Address
public Address(java.lang.String S,
java.lang.String Z)
- A constructor with parameters.
- Parameters:
S
- a string with the street infoZ
- a string with the zipcode info
display
public java.lang.String display()
- A method to return a display of the address data.
removeLeadingBlanks
public void removeLeadingBlanks()
- A void method to remove leading blanks.
This method uses the static method
Misc.stripLeadingBlanks
.