Interface ModifiableRepeater
-
- All Superinterfaces:
Repeater
- All Known Implementing Classes:
ModifiableModelAwareRepeater
public interface ModifiableRepeater extends Repeater
Interface for modifiable repeaters
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModifiableRepeaterEntry
addEntry()
Creates a Repeater entry at the last position.ModifiableRepeaterEntry
addEntry(int position)
Creates a Repeater entry at the given position.ModifiableRepeaterEntry
getEntry(int position)
Retrieves the repeater entry at the given position.ModifiableRepositoryData
getRepositoryData()
Retrieves the repository data used by thisRepeater
void
moveEntries(Map<Integer,Integer> positionsMapping)
Moves the entries according to the given position mapping.void
removeEntry(int position)
Removes the repeater entry at the given position.
-
-
-
Method Detail
-
getEntry
ModifiableRepeaterEntry getEntry(int position)
Description copied from interface:Repeater
Retrieves the repeater entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size to get an entry from the beginning Or the position can an integer between 0 and - the repeater size to get an entry from the end (0 means at the end, -1 means before the last one and so on)
-
addEntry
ModifiableRepeaterEntry addEntry()
Creates a Repeater entry at the last position.- Returns:
- the created entry
-
addEntry
ModifiableRepeaterEntry addEntry(int position) throws IllegalArgumentException
Creates a Repeater entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size + 1 to insert an entry from the beginning Or the position can an integer between 0 and - the repeater size to insert an entry from the end (0 means at the end, -1 means before the last one and so on)- Parameters:
position
- The position of the new entry- Returns:
- the created entry
- Throws:
IllegalArgumentException
- if the position is not between the negative and positive repeater size
-
moveEntries
void moveEntries(Map<Integer,Integer> positionsMapping)
Moves the entries according to the given position mapping. The given position mapping's key is the new position and the value is the previous position Put negative value for new entries The existent entries with no corresponding entry in the position mapping will be removed- Parameters:
positionsMapping
- the position mapping
-
removeEntry
void removeEntry(int position) throws UnknownDataException
Removes the repeater entry at the given position. The position starts at index 1. The position can be an integer between 1 and the repeater size to remove an entry from the beginning Or the position can an integer between 0 and - the repeater size to remove an entry from the end (0 means at the end, -1 means before the last one and so on)- Parameters:
position
- The position of the entry to remove- Throws:
UnknownDataException
- if there is no entry at the given position
-
getRepositoryData
ModifiableRepositoryData getRepositoryData()
Description copied from interface:Repeater
Retrieves the repository data used by thisRepeater
- Specified by:
getRepositoryData
in interfaceRepeater
- Returns:
- the repository data used by this
Repeater
-
-