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:
  • Field Details

    • key

      protected final K key
  • Constructor Details

    • AbstractWebNotifListData

      public AbstractWebNotifListData(K key, List<V> list)
      Parameters:
      key -
      list -
    • AbstractWebNotifListData

      public AbstractWebNotifListData(K key)
  • Method Details

    • getList

      public List<V> getList()
      Gets the list of its wrapper
      Returns:
    • 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 from
      to - 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:
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object