Class AbstractIndexManager.DataIndexSet<D extends Data,​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,​java.util.Set<E>>
    Pseudo Set to store previoulsy computed information associated to Data and DBData
    Since:
    9.0.3 - JCMS-5258
    • Constructor Summary

      Constructors 
      Constructor Description
      DataIndexSet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(D data, E element)
      Add the specified element to the Set corresponding to the specified data.
      void clear​(D data)
      Removes all of the elements from the Set associated to the specified Data.
      java.util.Set<E> get​(D data)
      Retrieve the Set associated to the specified data.
      boolean remove​(D data, E obj)
      Removes the specified element from the Set corresponding to the specified data.
      java.util.Set<E> set​(D data, java.util.Set<E> set)
      Set the Set to associate to the specified data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataIndexSet

        public DataIndexSet()
    • Method Detail

      • get

        public java.util.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 java.util.Set<E> set​(D data,
                                    java.util.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