|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.echo2.binding.ListItem
public class ListItem
A simple bean that represents an item that can be added to a
ListModel.
Copyright 2006 Sans Pareil Technologies, Inc.
| Field Summary | |
|---|---|
protected boolean |
selected
A flag indicating whether the value is selected or not. |
protected String |
value
The item or value stored in the list. |
| Constructor Summary | |
|---|---|
protected |
ListItem()
Default constructor. |
|
ListItem(String value)
Create a new instance of the bean using the specified object. |
|
ListItem(String value,
boolean selected)
Designated constructor. |
| Method Summary | |
|---|---|
Object |
clone()
Creates and returns a copy of this object. |
int |
compareTo(ListItem item)
Implementation of the Comparable interface. |
boolean |
equals(Object object)
Check the specified object with this object for equality. |
boolean |
getSelected()
Returns selected. |
String |
getValue()
Returns value. |
int |
hashCode()
Return a hash code value for this object. |
boolean |
isSelected()
Returns the status of selected. |
void |
setSelected(boolean selected)
Set selected. |
void |
setValue(String value)
Set value. |
String |
toString()
Return a string representation of this object. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String value
protected boolean selected
value is selected or not.
| Constructor Detail |
|---|
protected ListItem()
public ListItem(String value)
selected to false for the
specified object.
value - The value to set.
public ListItem(String value,
boolean selected)
value - The value to set.selected - The selected value to set.| Method Detail |
|---|
public String toString()
toString in class Objectpublic boolean equals(Object object)
equals in class Objectobject - The object that is to be checked for equality with.
true if the object is of the
same type as this object and has the same field values.public int hashCode()
hashCode in class Objectpublic int compareTo(ListItem item)
Comparable interface.
Compares this object with the specified object for order. Returns
a negative integer, zero, or a positive integer as this object is
less than, equal to, or greater than the specified object.
The comparison is done by comparing the hashCode() values
of the objects.
compareTo in interface Comparable<ListItem>item - - The object with which this class is to
be compared.
public Object clone()
throws CloneNotSupportedException
Cloneable interface. No special actions are
performed. This method simply allows public access to the
Object.clone method.
clone in class ObjectCloneNotSupportedException - If the super-class
implementation throws an error.public final String getValue()
value.
public void setValue(String value)
value.
value - The value to set.public final boolean getSelected()
selected.
public final boolean isSelected()
selected.
public void setSelected(boolean selected)
selected.
selected - The value to set.
|
SPT Core API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||