org.softsmithy.lib.util
Interface Matcher<T>

All Known Implementing Classes:
AbstractMatcher

public interface Matcher<T>

Useful for generated classes, which don't override the equals method (e.g. some JAXB class generators) or if a custom matching algorithm is needed.

Author:
puce

Method Summary
 boolean equals(T a, T b)
           
 Class<T> getType()
          TODO: needed?
 int hashCode(T t)
           
 String toString(T t)
           
 void verify(T t)
          Verifies that the specified object can be used with this matcher.
 

Method Detail

verify

void verify(T t)
            throws MatchingException
Verifies that the specified object can be used with this matcher. TODO: useful?

Parameters:
t - the object to test
Throws:
MatchingException

hashCode

int hashCode(T t)

equals

boolean equals(T a,
               T b)

toString

String toString(T t)

getType

Class<T> getType()
TODO: needed? Better way to implement MatchableObject#equals?



Copyright © 2002-2011 SoftSmithy. All Rights Reserved.