Class RecordedNodeMap

java.lang.Object
me.lucko.luckperms.common.model.nodemap.RecordedNodeMap
All Implemented Interfaces:
NodeMap

public class RecordedNodeMap extends Object implements NodeMap
A forwarding NodeMap that records all mutations and keeps them in a log.
  • Constructor Details

    • RecordedNodeMap

      public RecordedNodeMap(NodeMap delegate)
  • Method Details

    • bypass

      public NodeMap bypass()
    • discardChanges

      public void discardChanges()
    • exportChanges

      public Difference<net.luckperms.api.node.Node> exportChanges(Predicate<Difference<net.luckperms.api.node.Node>> onlyIf)
    • addDefaultNodeToChangeSet

      public Difference<net.luckperms.api.node.Node> addDefaultNodeToChangeSet()
    • add

      public Difference<net.luckperms.api.node.Node> add(net.luckperms.api.node.Node nodeWithoutInheritanceOrigin)
      Specified by:
      add in interface NodeMap
    • remove

      public Difference<net.luckperms.api.node.Node> remove(net.luckperms.api.node.Node node)
      Specified by:
      remove in interface NodeMap
    • removeExact

      public Difference<net.luckperms.api.node.Node> removeExact(net.luckperms.api.node.Node node)
      Specified by:
      removeExact in interface NodeMap
    • removeIf

      public Difference<net.luckperms.api.node.Node> removeIf(Predicate<? super net.luckperms.api.node.Node> predicate)
      Specified by:
      removeIf in interface NodeMap
    • removeIf

      public Difference<net.luckperms.api.node.Node> removeIf(net.luckperms.api.context.ContextSet contextSet, Predicate<? super net.luckperms.api.node.Node> predicate)
      Specified by:
      removeIf in interface NodeMap
    • removeThenAdd

      public Difference<net.luckperms.api.node.Node> removeThenAdd(net.luckperms.api.node.Node nodeToRemove, net.luckperms.api.node.Node nodeToAdd)
      Specified by:
      removeThenAdd in interface NodeMap
    • clear

      public Difference<net.luckperms.api.node.Node> clear()
      Specified by:
      clear in interface NodeMap
    • clear

      public Difference<net.luckperms.api.node.Node> clear(net.luckperms.api.context.ContextSet contextSet)
      Specified by:
      clear in interface NodeMap
    • setContent

      public Difference<net.luckperms.api.node.Node> setContent(Iterable<? extends net.luckperms.api.node.Node> set)
      Specified by:
      setContent in interface NodeMap
    • setContent

      public Difference<net.luckperms.api.node.Node> setContent(Stream<? extends net.luckperms.api.node.Node> stream)
      Specified by:
      setContent in interface NodeMap
    • applyChanges

      public Difference<net.luckperms.api.node.Node> applyChanges(Difference<net.luckperms.api.node.Node> changes)
      Specified by:
      applyChanges in interface NodeMap
    • addAll

      public Difference<net.luckperms.api.node.Node> addAll(Iterable<? extends net.luckperms.api.node.Node> set)
      Specified by:
      addAll in interface NodeMap
    • addAll

      public Difference<net.luckperms.api.node.Node> addAll(Stream<? extends net.luckperms.api.node.Node> stream)
      Specified by:
      addAll in interface NodeMap
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface NodeMap
    • size

      public int size()
      Specified by:
      size in interface NodeMap
    • asList

      public List<net.luckperms.api.node.Node> asList()
      Specified by:
      asList in interface NodeMap
    • asSet

      public LinkedHashSet<net.luckperms.api.node.Node> asSet()
      Specified by:
      asSet in interface NodeMap
    • asSortedSet

      public SortedSet<net.luckperms.api.node.Node> asSortedSet()
      Specified by:
      asSortedSet in interface NodeMap
    • asImmutableSet

      public com.google.common.collect.ImmutableSet<net.luckperms.api.node.Node> asImmutableSet()
      Specified by:
      asImmutableSet in interface NodeMap
    • asMap

      public Map<net.luckperms.api.context.ImmutableContextSet, Collection<net.luckperms.api.node.Node>> asMap()
      Specified by:
      asMap in interface NodeMap
    • inheritanceAsList

      public List<net.luckperms.api.node.types.InheritanceNode> inheritanceAsList()
      Specified by:
      inheritanceAsList in interface NodeMap
    • inheritanceAsSet

      public LinkedHashSet<net.luckperms.api.node.types.InheritanceNode> inheritanceAsSet()
      Specified by:
      inheritanceAsSet in interface NodeMap
    • inheritanceAsSortedSet

      public SortedSet<net.luckperms.api.node.types.InheritanceNode> inheritanceAsSortedSet()
      Specified by:
      inheritanceAsSortedSet in interface NodeMap
    • inheritanceAsImmutableSet

      public com.google.common.collect.ImmutableSet<net.luckperms.api.node.types.InheritanceNode> inheritanceAsImmutableSet()
      Specified by:
      inheritanceAsImmutableSet in interface NodeMap
    • inheritanceAsMap

      public Map<net.luckperms.api.context.ImmutableContextSet, Collection<net.luckperms.api.node.types.InheritanceNode>> inheritanceAsMap()
      Specified by:
      inheritanceAsMap in interface NodeMap
    • forEach

      public void forEach(Consumer<? super net.luckperms.api.node.Node> consumer)
      Specified by:
      forEach in interface NodeMap
    • forEach

      public void forEach(net.luckperms.api.query.QueryOptions filter, Consumer<? super net.luckperms.api.node.Node> consumer)
      Specified by:
      forEach in interface NodeMap
    • copyTo

      public void copyTo(Collection<? super net.luckperms.api.node.Node> collection)
      Specified by:
      copyTo in interface NodeMap
    • copyTo

      public void copyTo(com.google.common.collect.ImmutableCollection.Builder<? super net.luckperms.api.node.Node> collection)
      Specified by:
      copyTo in interface NodeMap
    • copyTo

      public void copyTo(Collection<? super net.luckperms.api.node.Node> collection, net.luckperms.api.query.QueryOptions filter)
      Specified by:
      copyTo in interface NodeMap
    • copyTo

      public <T extends net.luckperms.api.node.Node> void copyTo(Collection<? super T> collection, net.luckperms.api.node.NodeType<T> type, net.luckperms.api.query.QueryOptions filter)
      Specified by:
      copyTo in interface NodeMap
    • copyInheritanceNodesTo

      public void copyInheritanceNodesTo(Collection<? super net.luckperms.api.node.types.InheritanceNode> collection)
      Specified by:
      copyInheritanceNodesTo in interface NodeMap
    • copyInheritanceNodesTo

      public void copyInheritanceNodesTo(com.google.common.collect.ImmutableCollection.Builder<? super net.luckperms.api.node.types.InheritanceNode> collection)
      Specified by:
      copyInheritanceNodesTo in interface NodeMap
    • copyInheritanceNodesTo

      public void copyInheritanceNodesTo(Collection<? super net.luckperms.api.node.types.InheritanceNode> collection, net.luckperms.api.query.QueryOptions filter)
      Specified by:
      copyInheritanceNodesTo in interface NodeMap
    • nodesInContext

      public Collection<net.luckperms.api.node.Node> nodesInContext(net.luckperms.api.context.ContextSet context)
      Specified by:
      nodesInContext in interface NodeMap
    • inheritanceNodesInContext

      public Collection<net.luckperms.api.node.types.InheritanceNode> inheritanceNodesInContext(net.luckperms.api.context.ContextSet context)
      Specified by:
      inheritanceNodesInContext in interface NodeMap