Class AbstractIndexManager.DataIndexSet<D extends Data,E>

java.lang.Object
com.jalios.jcms.AbstractIndexManager.DataIndex<D,Set<E>>
com.jalios.jcms.AbstractIndexManager.DataIndexSet<D,E>
Type Parameters:
D - the data type for which index is being created
E - the type of element stored in the indexed set
Enclosing class:
AbstractIndexManager

public static class AbstractIndexManager.DataIndexSet<D extends Data,E> extends AbstractIndexManager.DataIndex<D,Set<E>>
Pseudo Set to store previoulsy computed information associated to Data and DBData
Since:
9.0.3 - JCMS-5258
  • Constructor Details

    • DataIndexSet

      public DataIndexSet()
  • Method Details

    • get

      public Set<E> get(D data)
      Retrieve the Set associated to the specified data.
      Parameters:
      data - the data for which the IndexSet is being retrieved
      Returns:
      an unmodifiable Set, never return null (instead return empty set)
    • set

      public Set<E> set(D data, Set<E> set)
      Set the Set to associate to the specified data.
      Parameters:
      data - the data for which the IndexSet is being modified
      set - the set to define
      Returns:
      the previous set associated with data, or null if there was no mapping for data.
    • add

      public boolean add(D data, E element)
      Add the specified element to the Set corresponding to the specified data.
      Parameters:
      data - the data for which the IndexSet is being modified
      element - the element to add. Important : if a DBData is specified it will be ignored and won't be added
      Returns:
      true if this set did not already contain the specified element
    • remove

      public boolean remove(D data, E obj)
      Removes the specified element from the Set corresponding to the specified data.
      Parameters:
      data - the data for which the IndexSet is being modified
      obj - object to be removed from the set, if present
      Returns:
      true if this set contained the specified element
    • clear

      public void clear(D data)
      Removes all of the elements from the Set associated to the specified Data. The set will be empty after this call returns.
      Parameters:
      data - the data for which the IndexSet is being modified