Package com.iizix.prop
Interface IElementArrayContainer<ITEM>
public interface IElementArrayContainer<ITEM>
Interface implements by containers that can contain elements of some kind.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- default voidAdds a new item.- default voidAdds a new items.- default IElementArrayContainer- <ITEM> Gets the target implementor of the interface.- default intGets the item count.- default void- insertItem- (ITEM item, int index) Inserts an item at specified index.- default voidRemoves all items.- default ITEM- removeItem- (int index) Removes an item.- default int- removeItem- (ITEM item) Removes an item.- default ITEMSets an item at specified index.- default voidSorts the list according to the default JVM locale case sensitively.- default void- sortItems- (boolean isCaseInsensitive) Sorts the list according to the default JVM locale.- default voidSorts the list according to a locale case sensitively.- default voidSorts the list according to a locale.
- Method Details- getElementArrayContainerGets the target implementor of the interface.- Returns:
- The target implements of the interface, null for none (this instance).
 
- getItemCountdefault int getItemCount()Gets the item count.- Returns:
- The count of items.
 
- sortItemsdefault void sortItems()Sorts the list according to the default JVM locale case sensitively.- Throws:
- IllegalStateException- If the container is read-only.
 
- sortItemsdefault void sortItems- (boolean isCaseInsensitive) Sorts the list according to the default JVM locale.- Parameters:
- isCaseInsensitive- Flag for case insensitive.
- Throws:
- IllegalStateException- If the container is read-only.
 
- sortItemsSorts the list according to a locale case sensitively.- Parameters:
- locale- The locale to use for string sorting.
- Throws:
- IllegalStateException- If the container is read-only.
 
- sortItemsSorts the list according to a locale.- Parameters:
- locale- The locale to use for string sorting, null for default..
- isCaseInsensitive- Flag for case insensitive.
- Throws:
- IllegalStateException- If the container is read-only.
 
- addItemAdds a new item.- Parameters:
- item- The item to add.
- Throws:
- NullPointerException- If the item is null.
- IllegalStateException- If the container is read-only.
 
- addItemsAdds a new items.- Parameters:
- items- The items to add.
- Throws:
- NullPointerException- If an item is null.
- IllegalStateException- If the container is read-only.
 
- insertItemInserts an item at specified index.- Parameters:
- item- The item to add.
- index- The index to insert the item before (-1 for last).
- Throws:
- NullPointerException- If the item is null.
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- setItemSets an item at specified index.- Parameters:
- item- The item to add.
- index- The index to insert the item before (-1 for last).
- Returns:
- The old item.
- Throws:
- NullPointerException- If the item is null.
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- removeItemRemoves an item.- Parameters:
- index- The index of the item to delete.
- Returns:
- The item deleted.
- Throws:
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- removeItemRemoves an item.- Parameters:
- item- The item to remove.
- Returns:
- The index of the item removed, -1 if not found.
- Throws:
- IndexOutOfBoundsException- If the index is in error.
- IllegalStateException- If the container is read-only.
 
- removeAllItemsdefault void removeAllItems()Removes all items.- Throws:
- IllegalStateException- If the container is read-only.