com.kuka.common.params
Class AbstractParameter<T>

java.lang.Object
  extended by com.kuka.common.params.AbstractParameter<T>
Type Parameters:
T - type of the parameter value.
All Implemented Interfaces:
IParameter<T>

public abstract class AbstractParameter<T>
extends Object
implements IParameter<T>

Represents a parameter with a value. Subclasses of this type should not add member variables that affect the notion of parameter equality. This requirement is reflected by the fact that equals(Object) and hashCode() are final.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
AbstractParameter()
          Creates an instance of this parameter.
AbstractParameter(T value)
          Creates an instance of this parameter with the given parameter value.
 
Method Summary
 boolean equals(Object obj)
          Compares the given object for equality with this one.
 int hashCode()
          Returns the hash code for this parameter value.
 T value()
          Returns the value of this parameter.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractParameter

public AbstractParameter(T value)
Creates an instance of this parameter with the given parameter value.

Parameters:
value - the parameter value

AbstractParameter

public AbstractParameter()
Creates an instance of this parameter.

Method Detail

value

public final T value()
Description copied from interface: IParameter
Returns the value of this parameter.

Specified by:
value in interface IParameter<T>
Returns:
the value of this parameter

hashCode

public final int hashCode()
Returns the hash code for this parameter value.

Overrides:
hashCode in class Object
Returns:
the hash code for this parameter value

equals

public final boolean equals(Object obj)
Compares the given object for equality with this one.

Overrides:
equals in class Object
Parameters:
obj - the object to be compared to this one
Returns:
true, if the type of the other object is exactly the same as the type of this object and it's value is equal to this object's value.
See Also:
Object.equals(Object), Object.getClass()


Copyright © 2019. All rights reserved.