public abstract class AbstractProperties<T extends ExecutableProperty> extends Object implements Properties<T>
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Collection<org.panda_lang.utilities.commons.function.Lazy<T>>> |
propertiesMap |
protected Class<T> |
propertiesType |
protected Type |
type |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProperties(Class<T> propertiesType,
Type type) |
| Modifier and Type | Method and Description |
|---|---|
void |
declare(String name,
Supplier<T> propertySupplier)
Declare a new property
|
List<? extends T> |
getDeclaredProperties()
Get properties declared in this container
|
protected List<T> |
getDeclaredProperties(Predicate<T> filter) |
List<? extends T> |
getProperties()
Get all available properties
|
protected List<T> |
getProperties(Predicate<T> filter) |
List<? extends T> |
getPropertiesLike(String name)
Get properties with the given name
|
protected List<T> |
getPropertiesLike(String name,
Predicate<T> filter) |
Type |
getType()
Get associated type
|
boolean |
hasPropertyLike(String name)
Check if container contains property with the given name
|
int |
size()
Get amount of properties
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeclareprotected final Class<T extends ExecutableProperty> propertiesType
protected final Type type
protected final Map<String,Collection<org.panda_lang.utilities.commons.function.Lazy<T extends ExecutableProperty>>> propertiesMap
public void declare(String name, Supplier<T> propertySupplier)
Propertiesdeclare in interface Properties<T extends ExecutableProperty>name - the name of propertypropertySupplier - the property to addpublic int size()
Propertiessize in interface Properties<T extends ExecutableProperty>public boolean hasPropertyLike(String name)
PropertieshasPropertyLike in interface Properties<T extends ExecutableProperty>name - the name to search forpublic List<? extends T> getPropertiesLike(String name)
PropertiesgetPropertiesLike in interface Properties<T extends ExecutableProperty>name - the name to search forpublic List<? extends T> getProperties()
PropertiesgetProperties in interface Properties<T extends ExecutableProperty>public List<? extends T> getDeclaredProperties()
PropertiesgetDeclaredProperties in interface Properties<T extends ExecutableProperty>public Type getType()
PropertiesgetType in interface Properties<T extends ExecutableProperty>Copyright © 2020. All rights reserved.