Package org.gcube.smartgears.context
Class Property
java.lang.Object
org.gcube.smartgears.context.Property
A named property with a value and a description.
- Author:
- Fabio Simeoni
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the description of this property.voiddisplay(boolean display) Sets whether the property is intended for displaybooleaninthashCode()booleanReturnstrueif the value of this property has a given type.booleanReturnstrueif the property is intended for displayname()Returns the name of this property.toString()value()Returns the value of this property.<S> SReturns the value of this property under a given type.
-
Constructor Details
-
Property
Creates an instance with a given name and value.- Parameters:
name- the namevalue- the value
-
Property
Creates an instance with a given name, value, and description.- Parameters:
name- the namevalue- the valuedescription- the description
-
-
Method Details
-
name
Returns the name of this property.- Returns:
- the name
-
display
public void display(boolean display) Sets whether the property is intended for display- Parameters:
display-trueif the property is intended for display
-
isDisplay
public boolean isDisplay()Returnstrueif the property is intended for display- Returns:
trueif the property is intended for display
-
value
Returns the value of this property.- Returns:
- the value
-
value
Returns the value of this property under a given type.- Returns:
- the value
- Throws:
IllegalStateException- if the value cannot be returned under the given type.
-
is
Returnstrueif the value of this property has a given type.- Parameters:
type- the type- Returns:
trueif the value of this property has a given type
-
description
Returns the description of this property.- Returns:
- the description
-
hashCode
public int hashCode() -
equals
-
toString
-