public class Property extends Object
| Constructor and Description |
|---|
Property(String name,
Object value)
Creates an instance with a given name and value.
|
Property(String name,
Object value,
boolean display)
Creates an instance with a given name and value.
|
Property(String name,
Object value,
String description)
Creates an instance with a given name, value, and description.
|
Property(String name,
Object value,
String description,
boolean display)
Creates an instance with a given name, value, description, and an indication of whether the property is intended for display.
|
| Modifier and Type | Method and Description |
|---|---|
String |
description()
Returns the description of this property.
|
void |
display(boolean display)
Sets whether the property is intended for display
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
is(Class<?> type)
Returns
true if the value of this property has a given type. |
boolean |
isDisplay()
Returns
true if the property is intended for display |
String |
name()
Returns the name of this property.
|
String |
toString() |
Object |
value()
Returns the value of this property.
|
<S> S |
value(Class<S> type)
Returns the value of this property under a given type.
|
public Property(String name, Object value)
name - the namevalue - the valuepublic Property(String name, Object value, boolean display)
name - the namevalue - the valuepublic Property(String name, Object value, String description)
name - the namevalue - the valuedescription - the descriptionpublic Property(String name, Object value, String description, boolean display)
name - the namevalue - the valuedescription - the descriptiondisplay - true if the property is intended for displaypublic String name()
public void display(boolean display)
display - true if the property is intended for displaypublic boolean isDisplay()
true if the property is intended for displaytrue if the property is intended for displaypublic Object value()
public <S> S value(Class<S> type)
IllegalStateException - if the value cannot be returned under the given type.public boolean is(Class<?> type)
true if the value of this property has a given type.type - the typetrue if the value of this property has a given typepublic String description()
Copyright © 2018. All rights reserved.