public static interface Node.Builder
| Modifier and Type | Method and Description |
|---|---|
Node |
build()
Creates a
Node instance from the builder. |
Node.Builder |
setExpiry(long expireAt)
Sets the nodes expiry as a unix timestamp in seconds.
|
Node.Builder |
setNegated(boolean negated)
Sets the value of negated for the node.
|
Node.Builder |
setOverride(boolean override)
Sets the override property for the node.
|
Node.Builder |
setServer(String server)
Sets the server value for the node.
|
Node.Builder |
setValue(boolean value)
Sets the value of the node.
|
Node.Builder |
setWorld(String world)
Sets the world value for the node.
|
Node.Builder |
withExtraContext(ContextSet set)
Appends extra contexts onto the node.
|
Node.Builder |
withExtraContext(Map.Entry<String,String> entry)
Appends an extra context onto the node.
|
Node.Builder |
withExtraContext(Map<String,String> map)
Appends extra contexts onto the node.
|
Node.Builder |
withExtraContext(Set<Map.Entry<String,String>> context)
Appends extra contexts onto the node.
|
Node.Builder |
withExtraContext(String key,
String value)
Appends an extra context onto the node.
|
@Nonnull Node.Builder setNegated(boolean negated)
negated - the valueNode.isNegated()@Nonnull Node.Builder setValue(boolean value)
value - the valueNode.getValuePrimitive()@Nonnull Node.Builder setOverride(boolean override)
Warning: this value does not persist, and disappears when the holder is re-loaded. It is therefore only useful for transient nodes.
override - the override stateNode.isOverride()@Nonnull Node.Builder setExpiry(long expireAt)
expireAt - the expiry timeNode.getExpiryUnixTime()@Nonnull Node.Builder setWorld(@Nullable String world)
world - the world valueNode.getWorld()@Nonnull Node.Builder setServer(@Nullable String server)
server - the world valueNode.getServer()@Nonnull Node.Builder withExtraContext(@Nonnull String key, @Nonnull String value)
key - the context keyvalue - the context valueContextSet,
Node.getContexts()@Nonnull Node.Builder withExtraContext(@Nonnull Map<String,String> map)
map - a map of contextsContextSet,
Node.getContexts()@Nonnull Node.Builder withExtraContext(@Nonnull Set<Map.Entry<String,String>> context)
context - a set of contextsContextSet,
Node.getContexts()@Nonnull Node.Builder withExtraContext(@Nonnull Map.Entry<String,String> entry)
entry - the contextContextSet,
Node.getContexts()@Nonnull Node.Builder withExtraContext(@Nonnull ContextSet set)
set - a contextsetContextSet,
Node.getContexts()Copyright © 2018. All rights reserved.