com.kuka.nav.fleet.graph.properties
Class EditableParameterAccess.Accessor

java.lang.Object
  extended by com.kuka.nav.fleet.graph.properties.EditableParameterAccess.Accessor
Enclosing class:
EditableParameterAccess

public static final class EditableParameterAccess.Accessor
extends Object

Class to access a specific field that has been annotated with EditableParameter of a specific class.


Nested Class Summary
 class EditableParameterAccess.Accessor.Range
           
 
Method Summary
<T> boolean
checkValue(T value)
          Checks if the given value is inside the allowed range.
 Class<?> getDataType()
           
 String getDefaultValue()
          This value is set if no value was given by user or the content of the text field was removed.
 String getDescription()
           
 String getDisplayName()
           
 String getName()
           
 Class<? extends Property> getPropertyType()
           
 EditableParameterAccess.Accessor.Range getRange()
           
 Object getValue(Object o)
          Gets the current value of an EditableParameter from an object for which this accessor has been constructed.
 boolean isNullable()
          Returns true or false if the value can be null or not.
 void setValue(Object o, Object value)
          Sets the value of an EditableParameter of an object for which this accessor has been constructed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDataType

public Class<?> getDataType()
Returns:
the type of the editable field.

getPropertyType

public Class<? extends Property> getPropertyType()
Returns:
the type of the property.

getDisplayName

public String getDisplayName()
Returns:
a name for the field for displaying to the user. It is language depending text.

getDescription

public String getDescription()
Returns:
a description of the field for displaying to the user.

getName

public String getName()
Returns:
the name

getDefaultValue

public String getDefaultValue()
This value is set if no value was given by user or the content of the text field was removed.

Returns:
default value or empty string if no value is set.

getRange

public EditableParameterAccess.Accessor.Range getRange()
Returns:
the range. Is null if no range is defined.

isNullable

public boolean isNullable()
Returns true or false if the value can be null or not.

Returns:
the value can be null

getValue

public Object getValue(Object o)
Gets the current value of an EditableParameter from an object for which this accessor has been constructed.

Parameters:
o - an object of a class for which this accessor is valid
Returns:
the current value of an EditableParameter for which this accessor is valid

setValue

public void setValue(Object o,
                     Object value)
Sets the value of an EditableParameter of an object for which this accessor has been constructed.

Parameters:
o - an object of a class for which this accessor is valid
value - the new value of the field, must be of the same type as the field

checkValue

public <T> boolean checkValue(T value)
Checks if the given value is inside the allowed range.

Type Parameters:
T - the type of the value
Parameters:
value - the new value of the field, must be of the same type as the field
Returns:
true, if the value is inside the allowed range


Copyright © 2019. All rights reserved.