Class ConfigurateOps
java.lang.Object
org.spongepowered.configurate.extra.dfu.v2.ConfigurateOps
- All Implemented Interfaces:
- DynamicOps<ConfigurationNode>
Implementation of DataFixerUpper's DynamicOps.
 
When possible, the first node's ConfigurationNode.copy()  method
 will be used to create a new node to contain results. Otherwise, the provided
 factory will be used. The default factory creates a
 CommentedConfigurationNode with the default TypeSerializer collection,
 but a custom factory may be provided.
- Since:
- 4.0.0
- 
Method SummaryModifier and TypeMethodDescriptioncreateBoolean(boolean value) createList(Stream<ConfigurationNode> input) createString(String value) empty()get(ConfigurationNode input, String key) getGeneric(ConfigurationNode input, ConfigurationNode key) getMapValues(ConfigurationNode input) getNumberValue(ConfigurationNode input) getStream(ConfigurationNode input) getStringValue(ConfigurationNode input) Type<?>getType(ConfigurationNode input) static DynamicOps<ConfigurationNode>instance()Get the shared instance of this class, which creates new nodes using the default factory.merge(ConfigurationNode first, ConfigurationNode second) Merge into a newly created node.mergeInto(ConfigurationNode input, ConfigurationNode value) mergeInto(ConfigurationNode input, ConfigurationNode key, ConfigurationNode value) remove(ConfigurationNode input, String key) set(ConfigurationNode input, String key, ConfigurationNode value) toString()update(ConfigurationNode input, String key, Function<ConfigurationNode, ConfigurationNode> function) updateGeneric(ConfigurationNode input, ConfigurationNode wrappedKey, Function<ConfigurationNode, ConfigurationNode> function) static DynamicOps<ConfigurationNode>withNodeFactory(Supplier<? extends ConfigurationNode> factory) Create a new instance of the ops, with a custom node factory.static Dynamic<ConfigurationNode>wrap(ConfigurationNode node) Wrap a ConfigurationNode in aDynamicinstance.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.mojang.datafixers.types.DynamicOpscast, createByte, createByteList, createDouble, createFloat, createInt, createIntList, createLong, createLongList, createShort, emptyList, emptyMap, getByteBuffer, getIntStream, getLongStream, getNumberValue
- 
Method Details- 
instanceGet the shared instance of this class, which creates new nodes using the default factory.- Returns:
- the shared instance
- Since:
- 4.0.0
 
- 
withNodeFactorypublic static DynamicOps<ConfigurationNode> withNodeFactory(Supplier<? extends ConfigurationNode> factory) Create a new instance of the ops, with a custom node factory.- Parameters:
- factory- the factory function
- Returns:
- a new ops instance
- Since:
- 4.0.0
 
- 
wrapWrap a ConfigurationNode in aDynamicinstance. The returned Dynamic will use the same type serializer collection as the original node for its operations.- Parameters:
- node- the node to wrap
- Returns:
- a wrapped node
- Since:
- 4.0.0
 
- 
empty- Specified by:
- emptyin interface- DynamicOps<ConfigurationNode>
 
- 
getType- Specified by:
- getTypein interface- DynamicOps<ConfigurationNode>
 
- 
getNumberValue- Specified by:
- getNumberValuein interface- DynamicOps<ConfigurationNode>
 
- 
createNumeric- Specified by:
- createNumericin interface- DynamicOps<ConfigurationNode>
 
- 
createBoolean- Specified by:
- createBooleanin interface- DynamicOps<ConfigurationNode>
 
- 
getStringValue- Specified by:
- getStringValuein interface- DynamicOps<ConfigurationNode>
 
- 
createString- Specified by:
- createStringin interface- DynamicOps<ConfigurationNode>
 
- 
mergeInto- Specified by:
- mergeIntoin interface- DynamicOps<ConfigurationNode>
 
- 
mergeIntopublic ConfigurationNode mergeInto(ConfigurationNode input, ConfigurationNode key, ConfigurationNode value) - Specified by:
- mergeIntoin interface- DynamicOps<ConfigurationNode>
 
- 
mergeMerge into a newly created node.- Specified by:
- mergein interface- DynamicOps<ConfigurationNode>
- Parameters:
- first- the primary node
- second- the second node, with values that will override those in the first node
- Returns:
- a newly created node
 
- 
getMapValues- Specified by:
- getMapValuesin interface- DynamicOps<ConfigurationNode>
 
- 
createMap- Specified by:
- createMapin interface- DynamicOps<ConfigurationNode>
 
- 
getStream- Specified by:
- getStreamin interface- DynamicOps<ConfigurationNode>
 
- 
createList- Specified by:
- createListin interface- DynamicOps<ConfigurationNode>
 
- 
remove- Specified by:
- removein interface- DynamicOps<ConfigurationNode>
 
- 
get- Specified by:
- getin interface- DynamicOps<ConfigurationNode>
 
- 
getGeneric- Specified by:
- getGenericin interface- DynamicOps<ConfigurationNode>
 
- 
set- Specified by:
- setin interface- DynamicOps<ConfigurationNode>
 
- 
updatepublic ConfigurationNode update(ConfigurationNode input, String key, Function<ConfigurationNode, ConfigurationNode> function) - Specified by:
- updatein interface- DynamicOps<ConfigurationNode>
 
- 
updateGenericpublic ConfigurationNode updateGeneric(ConfigurationNode input, ConfigurationNode wrappedKey, Function<ConfigurationNode, ConfigurationNode> function) - Specified by:
- updateGenericin interface- DynamicOps<ConfigurationNode>
 
- 
toString
 
-