Package com.iizix.prop.content
Interface IContentProviderPropCnrAPI<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>> 
- All Known Implementing Classes:
- EMapMarkers,- EMLGroup,- MapMarkers,- MLGroup
public interface IContentProviderPropCnrAPI<ITEM extends IContentItem,ITEM_CONTENT extends IContentData<ITEM>> 
The API as an interface with default code that easily is added to a container to provide the general code.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- default void- add- (int index, ITEM_CONTENT item) Inserts a new item before the specified index.- default void- add- (ITEM_CONTENT item) Adds a new item last.- default ITEM_CONTENT- get- (int index) Gets an item at the specified index.- default ITEM_CONTENT[]- getAll()Gets all items.Gets the content provider for the API.- default int- indexOf- (ITEM_CONTENT item) Returns the index of an item.- default ITEM_CONTENT- remove- (int index) Removes an item at the specified index.- default boolean- remove- (ITEM_CONTENT item) Removes an item.- default booleanRemoves all items.
- Method Details- addAdds a new item last.- Parameters:
- item- The item to insert.
- Throws:
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- addInserts a new item before the specified index.- Parameters:
- index- The insertion point index, -1 for last.
- item- The item to insert.
- Throws:
- IndexOutOfBoundsException- If the index is not valid.
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- removeRemoves an item at the specified index.- Parameters:
- index- The item to remove.
- Returns:
- The removed item.
- Throws:
- IndexOutOfBoundsException- If the index is not valid.
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- removeRemoves an item.- Parameters:
- item- The item to remove.
- Returns:
- true for success, false if not found.
- Throws:
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- removeAlldefault boolean removeAll()Removes all items.- Returns:
- true for changed, false when no items were present.
- Throws:
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- getGets an item at the specified index.- Parameters:
- index- The index of the item.
- Returns:
- The item.
- Throws:
- IndexOutOfBoundsException- If the index is not valid.
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- getAllGets all items.- Returns:
- The array of items.
- Throws:
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- indexOfReturns the index of an item.- Parameters:
- item- The item to look-up.
- Returns:
- The index of the item, or -1 if not found.
- Throws:
- IllegalStateException- When the VirtualSpace is connected and changes must be done from there and not by means of API functions.
 
- getAPIContentProviderIContentProviderAPI<ITEM,- ITEM_CONTENT> getAPIContentProvider()Gets the content provider for the API.- Returns:
- The content provider, or null if API is not supported or none is set.