org.oddjob.beancmpr.matchables
Class SimpleMatchable

java.lang.Object
  extended by org.oddjob.beancmpr.matchables.SimpleMatchable
All Implemented Interfaces:
Matchable

public class SimpleMatchable
extends Object
implements Matchable

A simple implementation of a Matchable.

Author:
rob

Constructor Summary
SimpleMatchable(List<? extends Comparable<?>> keys, List<?> values, List<?> others, MatchableMetaData metaData)
          Only Constructor.
 
Method Summary
 MatchKey getKey()
          Get the key to match on.
 Iterable<?> getKeys()
          Get the keys.
 MatchableMetaData getMetaData()
          Get the meta data that describe this matchable.
 Iterable<?> getOthers()
          Get the others.
 Iterable<?> getValues()
          Get the values for comparison.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleMatchable

public SimpleMatchable(List<? extends Comparable<?>> keys,
                       List<?> values,
                       List<?> others,
                       MatchableMetaData metaData)
Only Constructor.

Parameters:
keys - The key values.
values - The values to compare.
others - Other values.
Method Detail

getKey

public MatchKey getKey()
Description copied from interface: Matchable
Get the key to match on.

Specified by:
getKey in interface Matchable
Returns:
The key.

getKeys

public Iterable<?> getKeys()
Description copied from interface: Matchable
Get the keys.

Specified by:
getKeys in interface Matchable
Returns:
The keys.

getValues

public Iterable<?> getValues()
Description copied from interface: Matchable
Get the values for comparison.

Specified by:
getValues in interface Matchable
Returns:
The values to compare.

getOthers

public Iterable<?> getOthers()
Description copied from interface: Matchable
Get the others.

Specified by:
getOthers in interface Matchable
Returns:
The others.

getMetaData

public MatchableMetaData getMetaData()
Description copied from interface: Matchable
Get the meta data that describe this matchable.

Specified by:
getMetaData in interface Matchable
Returns:
The meta data. Will not be null.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.