// Check for null and ensure exactly the same class - not subclass.
if (null == obj || getClass() != obj.getClass()) {
return false;
}
Alternative alt = (Alternative) obj;
boolean returnValue = false;
if (size() == alt.size()) {
List<ObjectNode> myValues = asList(toArray(new ObjectNode[size()]));
List<ObjectNode> altValues = asList(toArray(new ObjectNode[size()]));
returnValue = myValues.equals(altValues);
}
return returnValue;