@Test public void differentValueDoesntEqual() { NamedVehicleMessage anotherMessage = new SimpleVehicleMessage( name, Double.valueOf(24)); assertFalse(message.equals(anotherMessage)); }
@Override public boolean equals(Object obj) { if(!super.equals(obj) || !(obj instanceof SimpleVehicleMessage)) { return false; } final SimpleVehicleMessage other = (SimpleVehicleMessage) obj; return mValue.equals(other.mValue); }
SimpleVehicleMessage extends NamedVehicleMessage { @Override public boolean equals(Object obj) { if(!super.equals(obj) || !(obj instanceof SimpleVehicleMessage)) { return false; } final SimpleVehicleMessage other = (SimpleVehicleMessage) obj; return mValue.equals(other.mValue); } }
SimpleVehicleMessage extends NamedVehicleMessage { @Override public boolean equals(Object obj) { if(!super.equals(obj) || !(obj instanceof SimpleVehicleMessage)) { return false; } final SimpleVehicleMessage other = (SimpleVehicleMessage) obj; return mValue.equals(other.mValue); } SimpleVehicleMessage(Long timestamp, String name, Object value);  SimpleVehicleMessage(String name, Object value); protected  SimpleVehicleMessage(Parcel in); protected  SimpleVehicleMessage(); }
SimpleVehicleMessage extends NamedVehicleMessage { @Override public boolean equals(Object obj) { if(!super.equals(obj) || !(obj instanceof SimpleVehicleMessage)) { return false; } final SimpleVehicleMessage other = (SimpleVehicleMessage) obj; return mValue.equals(other.mValue); } SimpleVehicleMessage(Long timestamp, String name, Object value);  SimpleVehicleMessage(String name, Object value); protected  SimpleVehicleMessage(Parcel in); protected  SimpleVehicleMessage(); Object getValue(); Number getValueAsNumber(); String getValueAsString(); Boolean getValueAsBoolean(); static boolean containsRequiredFields(Set<String> fields); @Override boolean equals(Object obj); @Override String toString(); @Override void writeToParcel(Parcel out, int flags); @Override void readFromParcel(Parcel in); }
SimpleVehicleMessage extends NamedVehicleMessage { @Override public boolean equals(Object obj) { if(!super.equals(obj) || !(obj instanceof SimpleVehicleMessage)) { return false; } final SimpleVehicleMessage other = (SimpleVehicleMessage) obj; return mValue.equals(other.mValue); } SimpleVehicleMessage(Long timestamp, String name, Object value);  SimpleVehicleMessage(String name, Object value); protected  SimpleVehicleMessage(Parcel in); protected  SimpleVehicleMessage(); Object getValue(); Number getValueAsNumber(); String getValueAsString(); Boolean getValueAsBoolean(); static boolean containsRequiredFields(Set<String> fields); @Override boolean equals(Object obj); @Override String toString(); @Override void writeToParcel(Parcel out, int flags); @Override void readFromParcel(Parcel in);  }