Package com.xpn.xwiki.objects.classes
Class ListItem
- java.lang.Object
-
- com.xpn.xwiki.objects.classes.ListItem
-
public class ListItem extends Object
An entry in a List or in a Tree.- Version:
- $Id: 56adb64862167c6bd3e1db8582130fa6a6c098aa $
-
-
Field Summary
Fields Modifier and Type Field Description protected static Comparator<ListItem>
ID_COMPARATOR
Comparator that orders list items on their identifiers, keeping null items at the end.protected static Comparator<ListItem>
VALUE_COMPARATOR
Comparator that orders list items on their values, keeping null items at the end.
-
Constructor Summary
Constructors Constructor Description ListItem(String id)
Constructor that initializes both theinternal ID
and thedisplayed value
with the same value, leaving theparent
field empty.ListItem(String id, String value)
Constructor that initializes theinternal ID
and thedisplayed value
, leaving theparent
field empty.ListItem(String id, String value, String parent)
-
-
-
Field Detail
-
ID_COMPARATOR
protected static final Comparator<ListItem> ID_COMPARATOR
Comparator that orders list items on their identifiers, keeping null items at the end.
-
VALUE_COMPARATOR
protected static final Comparator<ListItem> VALUE_COMPARATOR
Comparator that orders list items on their values, keeping null items at the end.
-
-
Constructor Detail
-
ListItem
public ListItem(String id)
Constructor that initializes both theinternal ID
and thedisplayed value
with the same value, leaving theparent
field empty.- Parameters:
id
- the value to use for the id and the displayed value
-
ListItem
public ListItem(String id, String value)
Constructor that initializes theinternal ID
and thedisplayed value
, leaving theparent
field empty.- Parameters:
id
- the value to use for the internal idvalue
- the value to use for the displayed value
-
-