Contents
Class BuilderObjectMapHelper<K,V>
java.lang.Object
com.hypixel.hytale.server.npc.asset.builder.BuilderObjectHelper<Map<K,V>>
com.hypixel.hytale.server.npc.asset.builder.BuilderObjectArrayHelper<Map<K,V>,V>
com.hypixel.hytale.server.npc.asset.builder.BuilderObjectMapHelper<K,V>
- All Implemented Interfaces:
BuilderContext
-
Constructor Summary
ConstructorsConstructorDescriptionBuilderObjectMapHelper(Class classType, Function<V, K> id, BuilderContext owner) -
Method Summary
Modifier and TypeMethodDescription<T,U> T anyMatch(BiFunction<Builder<V>, U, T> test, BuilderManager builderManager, ExecutionContext executionContext, U meta, T successResult, T emptyResult, T noMatchResult, Builder<?> parentSpawnable) Appliestestto each build in iteration order.build(BuilderSupport builderSupport) <T,U> T findFirst(BiFunction<Builder<V>, U, T> test, BuilderManager builderManager, ExecutionContext executionContext, U meta, T emptyResult, Builder<?> parentSpawnable) Appliestestto each builder in iteration order, skippingBuilderObjectReferenceHelper.excludeFromRegularBuild()entries.<A> voidforEach(BiConsumer<Builder<V>, A> action, A argument, BuilderManager builderManager, ExecutionContext executionContext, Builder<?> parent) Invokesactionfor each entry in iteration order (same order asbuild(BuilderSupport)).Methods inherited from class BuilderObjectArrayHelper
getLabel, hasNoElements, isEmpty, isPresent, readConfig, setLabel, validateMethods inherited from class BuilderObjectHelper
getClassType, getOwnerMethods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BuilderContext
getBreadCrumbs, getBreadCrumbs, getParent, setCurrentStateName
-
Constructor Details
-
BuilderObjectMapHelper
-
-
Method Details
-
build
- Specified by:
buildin classBuilderObjectHelper<Map<K,V>>
-
anyMatch
@Nullable public <T,U> T anyMatch(@Nonnull BiFunction<Builder<V>, U, T> test, @Nonnull BuilderManager builderManager, ExecutionContext executionContext, U meta, T successResult, T emptyResult, T noMatchResult, Builder<?> parentSpawnable) Appliestestto each build in iteration order. Ending when firsttestreturnssuccessResult. ReturnsemptyResultwhen container is empty andnoMatchResultwhen no test was successful. -
findFirst
@Nullable public <T,U> T findFirst(@Nonnull BiFunction<Builder<V>, U, T> test, @Nonnull BuilderManager builderManager, ExecutionContext executionContext, U meta, @Nullable T emptyResult, Builder<?> parentSpawnable) Appliestestto each builder in iteration order, skippingBuilderObjectReferenceHelper.excludeFromRegularBuild()entries. Returns the first non-null result, oremptyResultif no builders are present or all invocations returnednull. -
forEach
public <A> void forEach(@Nonnull BiConsumer<Builder<V>, A> action, @Nonnull A argument, @Nonnull BuilderManager builderManager, @Nonnull ExecutionContext executionContext, @Nonnull Builder<?> parent) Invokesactionfor each entry in iteration order (same order asbuild(BuilderSupport)).
-