Class CmsPublishRelationFinder.ResourceMap

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<CmsResource,Set<CmsResource>>
org.opencms.ade.publish.CmsPublishRelationFinder.ResourceMap
All Implemented Interfaces:
Serializable, Cloneable, Map<CmsResource,Set<CmsResource>>
Enclosing class:
CmsPublishRelationFinder

A map from resources to sets of resources, which automtically instantiates an empty set when accessing a key that doesn't exist via get().

See Also:
  • Constructor Details

  • Method Details

    • filter

      public CmsPublishRelationFinder.ResourceMap filter(com.google.common.base.Predicate<CmsResource> pred)
      Creates a new resource map based on this instance while filtering some elements out.

      The given predicate is used to check whether any single resource should be kept. If it returns false for a top-level resource (map key), the parent will be removed and all its children added as keys. If it returns false for a map value, the value will be removed for its key.

      Parameters:
      pred - predicate to check whether resources should be kept
      Returns:
      the new filtered resource map
    • get

      public Set<CmsResource> get(Object res)
      Specified by:
      get in interface Map<CmsResource,Set<CmsResource>>
      Overrides:
      get in class HashMap<CmsResource,Set<CmsResource>>
      See Also:
    • totalSize

      public int totalSize()
      Returns the sum of all sizes of set values.

      Returns:
      the total size