Package com.jalios.jcms
Class AbstractIndexManager.DataIndexSet<D extends Data,E>
- java.lang.Object
-
- com.jalios.jcms.AbstractIndexManager.DataIndex<D,java.util.Set<E>>
-
- com.jalios.jcms.AbstractIndexManager.DataIndexSet<D,E>
-
- Type Parameters:
D
- the data type for which index is being createdE
- 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
-
-
Field Summary
-
Fields inherited from class com.jalios.jcms.AbstractIndexManager.DataIndex
dataMap, dbDataMap
-
-
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 com.jalios.jcms.AbstractIndexManager.DataIndex
clear, getOriginalData, putIndexCollection, removeIndexCollection
-
-
-
-
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 modifiedset
- the set to define- Returns:
- the previous set associated with
data
, ornull
if there was no mapping fordata
.
-
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 modifiedelement
- 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 modifiedobj
- 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
-
-