@Override public boolean equals(Object o) { if( o == null || !(o instanceof CorrelationKeySet) ) { return false; } CorrelationKeySet another = (CorrelationKeySet)o; if( correlationKeys.size() != another.correlationKeys.size() ) { return false; } return containsAll(another); }
/** * Checks if an incoming message with this correlation key set can be accepted by the given * correlation key set. * * @param candidateKeySet a correlation key set stored in a route * @param isAllRoute use true if the route="all" is set * @return return true if routable */ public boolean isRoutableTo(CorrelationKeySet candidateKeySet, boolean isAllRoute) { boolean isRoutable = containsAll(candidateKeySet); if( isAllRoute ) { isRoutable = isRoutable || candidateKeySet.isOpaque() && isEmpty(); } return isRoutable; }