org.oddjob.beancmpr.matchables
Class SimpleMatchKey

java.lang.Object
  extended by org.oddjob.beancmpr.matchables.SimpleMatchKey
All Implemented Interfaces:
Comparable<MatchKey>, MatchKey

public class SimpleMatchKey
extends Object
implements MatchKey

A simple implementation of MatchKey.

Author:
rob

Constructor Summary
SimpleMatchKey(Iterable<? extends Comparable<?>> components)
          Constructor.
 
Method Summary
 int compareTo(MatchKey other)
           
 boolean equals(Object other)
           
 Iterable<? extends Comparable<?>> getKeys()
          Get the key elements.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleMatchKey

public SimpleMatchKey(Iterable<? extends Comparable<?>> components)
Constructor.

Parameters:
components - The component values of the key.
Method Detail

getKeys

public Iterable<? extends Comparable<?>> getKeys()
Description copied from interface: MatchKey
Get the key elements.

Specified by:
getKeys in interface MatchKey
Returns:
An Iterable of Comparables. Never null.

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(MatchKey other)
              throws ClassCastException
Specified by:
compareTo in interface Comparable<MatchKey>
Throws:
ClassCastException

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.