K - the PropertyType type the builder makes use ofT - the type of Property the builder producesB - builder extension (concrete class extending this builder)public abstract class PropertyBuilder<K,T,B extends PropertyBuilder<K,T,B>> extends Object
PropertyInitializer| Modifier and Type | Class and Description |
|---|---|
static class |
PropertyBuilder.ArrayPropertyBuilder<T>
Builder for
ArrayProperty. |
static interface |
PropertyBuilder.CreateFunction<K,T>
Function taking three arguments, which returns a property of the given type.
|
static class |
PropertyBuilder.InlineArrayPropertyBuilder<T>
Builder for
InlineArrayProperty. |
static class |
PropertyBuilder.ListPropertyBuilder<T>
Builder for
ListProperty. |
static class |
PropertyBuilder.MapPropertyBuilder<T>
Builder for
MapProperty. |
static class |
PropertyBuilder.TypeBasedPropertyBuilder<T>
Builder for
TypeBasedProperty. |
| Constructor and Description |
|---|
PropertyBuilder(PropertyType<K> type)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract Property<T> |
build()
Creates a property with the configured details.
|
B |
defaultValue(T defaultValue)
Sets the default of the property.
|
protected T |
getDefaultValue() |
protected String |
getPath() |
protected PropertyType<K> |
getType() |
B |
path(String path)
Sets the path of the property.
|
public PropertyBuilder(PropertyType<K> type)
type - the property typepublic B path(String path)
path - the pathpublic B defaultValue(T defaultValue)
defaultValue - the default value to setpublic abstract Property<T> build()
protected final String getPath()
protected final T getDefaultValue()
protected final PropertyType<K> getType()
Copyright © 2016–2019 The AuthMe Team. All rights reserved.