de.smartics.properties.api.config.domain
Class PropertyDefinition

Package class diagram package PropertyDefinition
java.lang.Object
  extended by de.smartics.properties.api.config.domain.PropertyDefinition
All Implemented Interfaces:
Serializable

public final class PropertyDefinition
     
     
extends Object
implements Serializable

Container of the property information the index provides.

See Also:
Serialized Form

Constructor Summary
PropertyDefinition(PropertyDescriptor descriptor, Property property)
          Default constructor.
 
Method Summary
 boolean equals(Object object)
          Returns true if the given object is semantically equal to the given object, false otherwise.
 PropertyDescriptor getDescriptor()
          Returns the descriptor of the property.
 Property getProperty()
          Returns the value and location information of the property.
 int hashCode()
          Returns the hash code of the object.
 String toString()
           Provides the properties via reflection for displaying debug information.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyDefinition

public PropertyDefinition(PropertyDescriptor descriptor,
                          Property property)
                   throws de.smartics.util.lang.NullArgumentException,
                          IllegalArgumentException
Default constructor.

Parameters:
descriptor - the descriptor of the property.
property - the value and location information of the property.
Throws:
de.smartics.util.lang.NullArgumentException - if descriptor or property is null.
IllegalArgumentException - if the descriptor and property do not match. They do not match if their property keys differ.
Method Detail

getDescriptor

public PropertyDescriptor getDescriptor()
Returns the descriptor of the property.

Returns:
the descriptor of the property. Never null.

getProperty

public Property getProperty()
Returns the value and location information of the property.

Returns:
the value and location information of the property. Never null.

hashCode

public int hashCode()
Returns the hash code of the object.

Overrides:
hashCode in class Object
Returns:
the hash code.
See Also:
hashCode()

equals

public boolean equals(Object object)
Returns true if the given object is semantically equal to the given object, false otherwise.

It is assumed that a descriptor with its key is unique. Therefore two definitions are equal, if their descriptor keys are equal, they share the same value and source location of the value.

Overrides:
equals in class Object
Parameters:
object - object the instance to compare to.
Returns:
true if the given object is semantically equal to the given object, false otherwise.

toString

public String toString()

Provides the properties via reflection for displaying debug information.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.