|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--superwaba.ext.xplat.io.pimal.VersitField
Abstract superclass for Field-classes that use the vCard or vCalendar standard. Contains methods for handling key-option-value triples Please refer to vCard and vCalendar specification for more information
| Field Summary | |
protected int |
key
|
protected Hashtable |
options
|
protected java.lang.String[] |
optionsAsArray
|
protected java.lang.String[] |
values
|
static int |
X
|
| Constructor Summary | |
VersitField(int key,
java.lang.String[] options,
java.lang.String[] values)
Saves the key and the values in arrays and the options in a hashtable |
|
| Method Summary | |
void |
addOption(java.lang.String key,
java.lang.String value)
Adds an option to this field. |
protected java.lang.String[] |
cloneOptions()
Clones the options |
protected java.lang.String[] |
cloneValues()
Clones the values |
int |
getKey()
Getter for the key |
Vector |
getOption(java.lang.String key)
Returns option-values for a specific option-key |
Hashtable |
getOptions()
Returns this field's options. |
java.lang.String[] |
getValues()
Getter for the values |
boolean |
hasOption(java.lang.String key,
java.lang.String value)
Checks of a spcific option is set |
int |
match(VersitField fieldToMatch)
Calculates a score, how similar to VersitFields are |
void |
removeOption(java.lang.String key,
java.lang.String value)
Removes a specific option. |
void |
setValues(java.lang.String[] values)
Setter for the values |
java.lang.String |
toString()
This method returns the String representative of this Object. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final int X
protected int key
protected java.lang.String[] values
protected Hashtable options
protected java.lang.String[] optionsAsArray
| Constructor Detail |
public VersitField(int key,
java.lang.String[] options,
java.lang.String[] values)
key - a field's keyoptions - options to storevalues - values to store| Method Detail |
public int getKey()
public Hashtable getOptions()
public Vector getOption(java.lang.String key)
key - the option-key for which options should be returnedpublic java.lang.String[] getValues()
public void addOption(java.lang.String key,
java.lang.String value)
key - the option's keyvalue - the option's value
public void removeOption(java.lang.String key,
java.lang.String value)
key - the key, whose given value should be removedvalue - the value that should be removedpublic void setValues(java.lang.String[] values)
values - values to setpublic java.lang.String toString()
Object.toString()protected java.lang.String[] cloneOptions()
protected java.lang.String[] cloneValues()
public boolean hasOption(java.lang.String key,
java.lang.String value)
key - the key of the option to checkvalue - the value, that has to be settrue, if the value is found for the given option, otherwise falsepublic int match(VersitField fieldToMatch)
fieldToMatch - VersitField to compare this field to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||