List of usage examples for java.util Collection hashCode
int hashCode();
From source file:org.dataconservancy.ui.api.CollectionController.java
String calculateEtag(Collection collection) { return ETagCalculator.calculate(String.valueOf(collection.hashCode())); }
From source file:com.opengamma.engine.depgraph.ResolveTask.java
public ResolveTask(final ValueRequirement valueRequirement, final ResolveTask parent, final Collection<FunctionExclusionGroup> functionExclusion) { super(valueRequirement); final int hc; if (parent != null) { if (parent.getParentValueRequirements() != null) { _parentRequirements = new HashSet<ValueRequirement>(parent.getParentValueRequirements()); _parentRequirements.add(parent.getValueRequirement()); } else {/*from ww w . j av a 2 s . c o m*/ _parentRequirements = Collections.singleton(parent.getValueRequirement()); } hc = valueRequirement.hashCode() * 31 + _parentRequirements.hashCode(); } else { _parentRequirements = null; hc = valueRequirement.hashCode(); } if (functionExclusion != null) { _functionExclusion = functionExclusion; _hashCode = hc * 31 + functionExclusion.hashCode(); } else { _functionExclusion = null; _hashCode = hc; } _state = new GetFunctionsStep(this); }