Class AbstractWebNotifListData<K,V>
- java.lang.Object
-
- org.exoplatform.commons.notification.impl.service.storage.cache.AbstractWebNotifListData<K,V>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
ListWebNotificationsData
public abstract class AbstractWebNotifListData<K,V> extends Object implements Serializable
Created by The eXo Platform SAS Author : eXoPlatform exo@exoplatform.com Oct 30, 2014- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractWebNotifListData(K key)AbstractWebNotifListData(K key, List<V> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterMove()voidafterPut()voidafterPutRef()voidafterRemove()voidbeforeMove(V value)voidbeforePut()voidbeforePutRef()voidbeforeRemove()voidclear()Removes all of the elements from this list.booleancontains(V value)Returns true if this list contains the specified element.booleanequals(Object o)List<V>getList()Gets the list of its wrapperinthashCode()voidinsertLast(V value)Inserts the value into last positionvoidmove(int index, V value, String ownerId)Moves the value at the given indexvoidmoveTop(V value, String ownerId)Moves the value at the top of listvoidput(int index, V value, String ownerId)Puts the value at the given indexvoidputAtTop(V value, String ownerId)Puts the value at the top of listvoidremove(V value, String ownerId)Moves the value at the given indexbooleanremoveByValue(V value)Removes the item by its valueintsize()Gets the size of elementsList<V>subList(int from, int to)Gets the sublist by given from and to
-
-
-
Field Detail
-
key
protected final K key
-
-
Method Detail
-
size
public int size()
Gets the size of elements- Returns:
-
subList
public List<V> subList(int from, int to)
Gets the sublist by given from and to- Parameters:
from- the given fromto- the given to- Returns:
- the sublist
-
put
public void put(int index, V value, String ownerId)Puts the value at the given index- Parameters:
value-ownerId-
-
putAtTop
public void putAtTop(V value, String ownerId)
Puts the value at the top of list- Parameters:
value- the given value
-
beforePut
public void beforePut()
-
afterPut
public void afterPut()
-
beforePutRef
public void beforePutRef()
-
afterPutRef
public void afterPutRef()
-
beforeMove
public void beforeMove(V value)
-
afterMove
public void afterMove()
-
beforeRemove
public void beforeRemove()
-
afterRemove
public void afterRemove()
-
move
public void move(int index, V value, String ownerId)Moves the value at the given index- Parameters:
value-ownerId-
-
moveTop
public void moveTop(V value, String ownerId)
Moves the value at the top of list- Parameters:
value- the given value
-
remove
public void remove(V value, String ownerId)
Moves the value at the given index- Parameters:
value-ownerId-
-
insertLast
public void insertLast(V value)
Inserts the value into last position- Parameters:
value-
-
contains
public boolean contains(V value)
Returns true if this list contains the specified element.- Parameters:
value-- Returns:
-
clear
public void clear()
Removes all of the elements from this list.
-
removeByValue
public boolean removeByValue(V value)
Removes the item by its value- Parameters:
value- the id- Returns:
-
-