Class AbstractNode<N extends net.luckperms.api.node.ScopedNode<N,B>,B extends net.luckperms.api.node.NodeBuilder<N,B>>

java.lang.Object
me.lucko.luckperms.common.node.AbstractNode<N,B>
All Implemented Interfaces:
net.luckperms.api.node.Node, net.luckperms.api.node.ScopedNode<N,B>
Direct Known Subclasses:
DisplayName, Inheritance, Meta, Permission, Prefix, RegexPermission, Suffix, Weight

public abstract class AbstractNode<N extends net.luckperms.api.node.ScopedNode<N,B>,B extends net.luckperms.api.node.NodeBuilder<N,B>> extends Object implements net.luckperms.api.node.ScopedNode<N,B>
  • Field Details

    • NODE_SEPARATOR

      public static final char NODE_SEPARATOR
      The character which separates each part of a permission node
      See Also:
    • NODE_SEPARATOR_STRING

      public static final String NODE_SEPARATOR_STRING
    • key

      protected final String key
    • value

      protected final boolean value
    • expireAt

      protected final long expireAt
    • contexts

      protected final net.luckperms.api.context.ImmutableContextSet contexts
    • metadata

      protected final Map<net.luckperms.api.node.metadata.NodeMetadataKey<?>,Object> metadata
  • Constructor Details

    • AbstractNode

      protected AbstractNode(String key, boolean value, long expireAt, net.luckperms.api.context.ImmutableContextSet contexts, Map<net.luckperms.api.node.metadata.NodeMetadataKey<?>,Object> metadata)
  • Method Details

    • getKey

      public @NonNull String getKey()
      Specified by:
      getKey in interface net.luckperms.api.node.Node
    • getValue

      public boolean getValue()
      Specified by:
      getValue in interface net.luckperms.api.node.Node
    • getContexts

      public @NonNull net.luckperms.api.context.ImmutableContextSet getContexts()
      Specified by:
      getContexts in interface net.luckperms.api.node.Node
    • getMetadata

      public <T> Optional<T> getMetadata(@NonNull net.luckperms.api.node.metadata.NodeMetadataKey<T> key)
      Specified by:
      getMetadata in interface net.luckperms.api.node.Node
    • hasExpiry

      public boolean hasExpiry()
      Specified by:
      hasExpiry in interface net.luckperms.api.node.Node
    • getExpiry

      public @Nullable Instant getExpiry()
      Specified by:
      getExpiry in interface net.luckperms.api.node.Node
    • hasExpired

      public boolean hasExpired()
      Specified by:
      hasExpired in interface net.luckperms.api.node.Node
    • getExpiryDuration

      public @Nullable Duration getExpiryDuration()
      Specified by:
      getExpiryDuration in interface net.luckperms.api.node.Node
    • resolveShorthand

      public @NonNull Collection<String> resolveShorthand()
      Specified by:
      resolveShorthand in interface net.luckperms.api.node.Node
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface net.luckperms.api.node.Node
      Overrides:
      equals in class Object
    • equals

      public boolean equals(@NonNull net.luckperms.api.node.Node o, @NonNull net.luckperms.api.node.NodeEqualityPredicate equalityPredicate)
      Specified by:
      equals in interface net.luckperms.api.node.Node
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object