org.oddjob.beancmpr.matchables
Class SimpleMatchKey
java.lang.Object
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
SimpleMatchKey
public SimpleMatchKey(Iterable<? extends Comparable<?>> components)
- Constructor.
- Parameters:
components
- The component values of the key.
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 Comparable
s. 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.