Class ProteusBuilder
java.lang.Object
io.github.kaktushose.proteus.ProteusBuilder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumTheProteusBuilder.ConflictStrategyto use if a duplicate path registration happens.static enumTheProteusBuilder.DefaultMappers to register. -
Method Summary
Modifier and TypeMethodDescription@NotNull Proteusbuild()Builds theProteusinstance.@NotNull ProteusBuildercacheSize(int cacheSize) The cache size to use for the underlying LRU-Cache used for caching conversion paths.@NotNull ProteusBuilderconflictStrategy(@NotNull ProteusBuilder.ConflictStrategy conflictStrategy) TheProteusBuilder.ConflictStrategyto use if a duplicate path registration happens.@NotNull ProteusBuilderdefaultMappers(ProteusBuilder.DefaultMapper... defaultMappers) The default mappers to register as described byProteusBuilder.DefaultMapper.
-
Method Details
-
cacheSize
The cache size to use for the underlying LRU-Cache used for caching conversion paths. The default value is1000.- Parameters:
cacheSize- cache size to use for the underlying LRU-Cache- Returns:
- this instance for fluent interface
-
defaultMappers
@NotNull public @NotNull ProteusBuilder defaultMappers(ProteusBuilder.DefaultMapper... defaultMappers) The default mappers to register as described byProteusBuilder.DefaultMapper. These default mappers are lossless and follow the widening and narrowing primitive conversion of the Java Language Specification.- Parameters:
defaultMappers- theProteusBuilder.DefaultMappers to register- Returns:
- this instance for fluent interface
- See Also:
- Implementation Note:
- By default, all
ProteusBuilder.DefaultMappers will be registered. Can be disabled by calling this method with zero arguments.
-
conflictStrategy
@NotNull public @NotNull ProteusBuilder conflictStrategy(@NotNull @NotNull ProteusBuilder.ConflictStrategy conflictStrategy) TheProteusBuilder.ConflictStrategyto use if a duplicate path registration happens. Although, eachTypecan havenneighbours, but each path can only exist once.- Parameters:
conflictStrategy- theProteusBuilder.ConflictStrategyto use- Returns:
- this instance for fluent interface
-
build
-