feat: Adds a toString to MappingCandidateHarvester.

This commit is contained in:
Boris Grozev 2016-11-16 16:32:55 -06:00
parent 6bc252fdd4
commit d538ca30c0

View File

@ -104,10 +104,8 @@ public class MappingCandidateHarvester
return null; return null;
} }
/* // Report the LocalCandidates gathered by this CandidateHarvester so
* Report the LocalCandidates gathered by this CandidateHarvester so // that the harvest is sure to be considered successful.
* that the harvest is sure to be considered successful.
*/
Collection<LocalCandidate> candidates = new HashSet<>(); Collection<LocalCandidate> candidates = new HashSet<>();
for (Candidate<?> cand : component.getLocalCandidates()) for (Candidate<?> cand : component.getLocalCandidates())
@ -164,4 +162,18 @@ public class MappingCandidateHarvester
{ {
return face; return face;
} }
/**
* {@inheritDoc}
*/
@Override
public String toString()
{
TransportAddress face = getFace();
TransportAddress mask = getMask();
return
this.getClass().getName()
+ ", face=" + (face == null ? "null" : face.getAddress())
+ ", mask=" + (mask == null ? "null" : mask.getAddress());
}
} }