Class DefaultEntityMetadataFactory<I,O>
java.lang.Object
com.github.juliarn.npclib.api.protocol.meta.DefaultEntityMetadataFactory<I,O>
- All Implemented Interfaces:
EntityMetadataFactory<I,O>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final classNested classes/interfaces inherited from interface com.github.juliarn.npclib.api.protocol.meta.EntityMetadataFactory
EntityMetadataFactory.Builder<I,O> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<PlatformVersionAccessor, Boolean> private final intprivate final int[]private final Collection<EntityMetadataFactory<I, Object>> private final Type -
Constructor Summary
ConstructorsConstructorDescriptionDefaultEntityMetadataFactory(int baseIndex, int[] indexShitVersions, @NotNull Type type, @NotNull Function<I, O> inputConverter, @NotNull Collection<EntityMetadataFactory<I, Object>> relatedMetadata, @NotNull Function<PlatformVersionAccessor, Boolean> availabilityChecker) -
Method Summary
Modifier and TypeMethodDescriptionprivate intcalcIndexShift(@NotNull PlatformVersionAccessor versionAccessor) @NotNull EntityMetadata<O> create(I input, @NotNull PlatformVersionAccessor versionAccessor) @Unmodifiable @NotNull Collection<EntityMetadataFactory<I, Object>>
-
Field Details
-
baseIndex
private final int baseIndex -
indexShitVersions
private final int[] indexShitVersions -
type
-
inputConverter
-
availabilityChecker
-
-
Constructor Details
-
DefaultEntityMetadataFactory
public DefaultEntityMetadataFactory(int baseIndex, int[] indexShitVersions, @NotNull @NotNull Type type, @NotNull @NotNull Function<I, O> inputConverter, @NotNull @NotNull Collection<EntityMetadataFactory<I, Object>> relatedMetadata, @NotNull @NotNull Function<PlatformVersionAccessor, Boolean> availabilityChecker)
-
-
Method Details
-
create
@NotNull public @NotNull EntityMetadata<O> create(@NotNull I input, @NotNull @NotNull PlatformVersionAccessor versionAccessor) - Specified by:
createin interfaceEntityMetadataFactory<I,O>
-
calcIndexShift