wabadma.util
Class Whipple

java.lang.Object
  |
  +--wabadma.util.Whipple

public class Whipple
extends java.lang.Object

This class provides a simple series of methods to pack several values into a single string. The value types are not checked upon retreival and no escaping of the internal seprator char is done. The default separator is '~', so if you use that in your strings, pick something else when constructing your Whipple.

Version:
1.0, 2000 Nov 23
Author:
David M. Archer

Constructor Summary
Whipple()
          Creates an empty Whipple object with a default separator.
Whipple(char c)
          Creates an empty Whipple object with given separator.
Whipple(java.lang.String s)
          Create a Whipple object from a passed string.
 
Method Summary
 java.lang.String get()
          Return the Whipple object as a string.
 boolean nextBoolean()
          Get the next value in the Whipple as a boolean.
 int nextInt()
          Get the next value in the Whipple as an int.
 java.lang.String nextString()
          Get the next value in the Whipple as a String.
 void put(boolean b)
          Put a boolean value into the Whipple.
 void put(int i)
          Put an int value into the Whipple.
 void put(java.lang.String s)
          Put a String value into the Whipple.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Whipple

public Whipple(char c)
Creates an empty Whipple object with given separator.

Whipple

public Whipple()
Creates an empty Whipple object with a default separator.

Whipple

public Whipple(java.lang.String s)
Create a Whipple object from a passed string.
Method Detail

get

public java.lang.String get()
Return the Whipple object as a string.

put

public void put(java.lang.String s)
Put a String value into the Whipple.

put

public void put(int i)
Put an int value into the Whipple.

put

public void put(boolean b)
Put a boolean value into the Whipple.

nextString

public java.lang.String nextString()
Get the next value in the Whipple as a String.

nextInt

public int nextInt()
Get the next value in the Whipple as an int.

nextBoolean

public boolean nextBoolean()
Get the next value in the Whipple as a boolean.