de.danielbechler.diff.path
Class NamedPropertyElement

java.lang.Object
  extended by de.danielbechler.diff.path.Element
      extended by de.danielbechler.diff.path.NamedPropertyElement

public final class NamedPropertyElement
extends Element

Author:
Daniel Bechler

Constructor Summary
NamedPropertyElement(String propertyName)
           
 
Method Summary
 boolean equals(Object o)
          Must be implemented in a way so that this element can be distinguished from the other ones.
 String getPropertyName()
           
 int hashCode()
          Make sure to implement this properly.
 String toString()
          The string representation will only be used to print readable property paths for debug purposes.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NamedPropertyElement

public NamedPropertyElement(String propertyName)
Method Detail

getPropertyName

public String getPropertyName()

equals

public boolean equals(Object o)
Description copied from class: Element
Must be implemented in a way so that this element can be distinguished from the other ones.

Specified by:
equals in class Element
Parameters:
o - The object to check equality against.
Returns:
true is the given object equals this one, otherwise false.

hashCode

public int hashCode()
Description copied from class: Element
Make sure to implement this properly. If two elements are equal, their hash code must be equal as well. However, it is absolutely okay if two unequal elements return the same hash code. A simple implementation could just return 0.

Specified by:
hashCode in class Element
Returns:
The hash code of this element.

toString

public String toString()
Description copied from class: Element
The string representation will only be used to print readable property paths for debug purposes.

Specified by:
toString in class Element
Returns:
A string representation of this element for debug purposes.


Copyright © 2012. All Rights Reserved.