|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.ObjectBidInfo
public class BidInfo
Encoding to and decoding from the BidInfo format used by the web shops and bidding clients to transmit bidding relevant data in a compact form.
| Nested Class Summary | |
|---|---|
class |
BidInfo.InvalidFormatException
Exception thrown by the BidInfo constructor signalling an invalid input string format |
| Constructor Summary | |
|---|---|
BidInfo(java.lang.String encoded)
Creates a new BidInfo object that decodes the given string |
|
| Method Summary | |
|---|---|
java.lang.String |
encode()
Encode the object contents into a string |
static java.lang.String |
encode(BidInfo info)
Encode a given BidInfo object into a string |
static java.lang.String |
encode(int vendor,
java.lang.String item,
float price)
Encodes a given set of items into a string |
java.lang.String |
getItem()
Returns the decoded item identifier |
float |
getPrice()
Returns the decoded list price |
int |
getVendor()
Returns the decoded vendor number |
static void |
main(java.lang.String[] args)
Run several test cases |
java.lang.String |
toString()
Returns a string representing the BidInfo object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BidInfo(java.lang.String encoded)
throws BidInfo.InvalidFormatException
BidInfo.InvalidFormatException| Method Detail |
|---|
public int getVendor()
public java.lang.String getItem()
public float getPrice()
public java.lang.String encode()
public java.lang.String toString()
toString in class java.lang.Object
public static java.lang.String encode(int vendor,
java.lang.String item,
float price)
public static java.lang.String encode(BidInfo info)
public static void main(java.lang.String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||