|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ujoframework.extensions.Property<UJO,java.util.List<ITEM>>
org.ujoframework.extensions.ListProperty<UJO,ITEM>
public class ListProperty<UJO extends Ujo,ITEM>
The main implementation of the interface ListUjoProperty.
AbstractUjo| Constructor Summary | |
|---|---|
protected |
ListProperty(java.lang.Class<ITEM> itemType)
Protected constructor |
protected |
ListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType,
int index)
Protected constructor |
| Method Summary | ||
|---|---|---|
boolean |
addItem(UJO ujo,
ITEM value)
Add Item Value. |
|
ITEM |
getItem(UJO ujo,
int index)
Returns a value of property. |
|
int |
getItemCount(UJO ujo)
Returns a count of Items. |
|
java.lang.Class<ITEM> |
getItemType()
Return a Class of the Item. |
|
java.util.List<ITEM> |
getList(UJO ujo)
Returns a not null List. |
|
protected ListProperty<UJO,ITEM> |
initList(java.lang.String name,
int index,
java.lang.Boolean lock)
List property initialization. |
|
boolean |
isDefault(UJO ujo)
Indicates whether a list of items is null or empty. |
|
boolean |
isItemTypeOf(java.lang.Class type)
Returns true if the item type is a type or subtype of the parameter class. |
|
static
|
newListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType)
A ListUjoProperty Factory Method assigns a next property index. |
|
static
|
newListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType,
int index)
A ListUjoProperty Factory Method assigns a next property index. |
|
static
|
newListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType,
int index,
boolean lock)
A ListUjoProperty Factory Method assigns a next property index. |
|
boolean |
removeItem(UJO ujo,
ITEM value)
Removes the first occurrence in this list of the specified element. |
|
ITEM |
setItem(UJO ujo,
int index,
ITEM value)
Set a property item value. |
|
void |
sort(UJO ujo,
UjoProperty... properties)
Sort a list by its properties. |
|
| Methods inherited from class org.ujoframework.extensions.Property |
|---|
_nextSequence, add, compareTo, copy, descending, equals, getDefault, getIndex, getName, getType, getValue, charAt, checkAttribs, init, isAscending, isDirect, isTypeOf, length, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, of, setValue, setValueFromDefault, subSequence, toString, writeDefault |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ujoframework.UjoProperty |
|---|
add, copy, descending, equals, getDefault, getIndex, getName, getType, getValue, isAscending, isDirect, isTypeOf, of, setValue, toString |
| Methods inherited from interface java.lang.CharSequence |
|---|
charAt, length, subSequence |
| Constructor Detail |
|---|
protected ListProperty(java.lang.Class<ITEM> itemType)
protected ListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType,
int index)
| Method Detail |
|---|
protected final ListProperty<UJO,ITEM> initList(java.lang.String name,
int index,
java.lang.Boolean lock)
name - Replace the Name of property if the one is NULL.index - Replace index always, the value -1 invoke a next number from the internal sequencer.lock - Lock the property.public int getItemCount(UJO ujo)
getItemCount in interface ListUjoProperty<UJO extends Ujo,ITEM>public java.lang.Class<ITEM> getItemType()
getItemType in interface ListUjoProperty<UJO extends Ujo,ITEM>public boolean isItemTypeOf(java.lang.Class type)
isItemTypeOf in interface ListUjoProperty<UJO extends Ujo,ITEM>
public ITEM getItem(UJO ujo,
int index)
getItem in interface ListUjoProperty<UJO extends Ujo,ITEM>
public ITEM setItem(UJO ujo,
int index,
ITEM value)
setItem in interface ListUjoProperty<UJO extends Ujo,ITEM>
public boolean addItem(UJO ujo,
ITEM value)
addItem in interface ListUjoProperty<UJO extends Ujo,ITEM>
public boolean removeItem(UJO ujo,
ITEM value)
removeItem in interface ListUjoProperty<UJO extends Ujo,ITEM>public java.util.List<ITEM> getList(UJO ujo)
getList in interface ListUjoProperty<UJO extends Ujo,ITEM>getItem(Ujo,int)
public void sort(UJO ujo,
UjoProperty... properties)
public boolean isDefault(UJO ujo)
isDefault in interface ListUjoProperty<UJO extends Ujo,ITEM>isDefault in interface UjoProperty<UJO extends Ujo,java.util.List<ITEM>>isDefault in class Property<UJO extends Ujo,java.util.List<ITEM>>
public static <UJO extends Ujo,ITEM> ListProperty<UJO,ITEM> newListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType,
int index,
boolean lock)
public static <UJO extends Ujo,ITEM> ListProperty<UJO,ITEM> newListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType,
int index)
public static <UJO extends Ujo,ITEM> ListProperty<UJO,ITEM> newListProperty(java.lang.String name,
java.lang.Class<ITEM> itemType)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||