@Test public void testSerialization() throws IOException, ClassNotFoundException { ValueMarker m1 = new ValueMarker(25.0); ByteArrayOutputStream buffer = new ByteArrayOutputStream(); ObjectOutput out = new ObjectOutputStream(buffer); out.writeObject(m1); out.close(); ObjectInput in = new ObjectInputStream( new ByteArrayInputStream(buffer.toByteArray())); ValueMarker m2 = (ValueMarker) in.readObject(); in.close(); boolean b = m1.equals(m2); assertTrue(b); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof ValueMarker)) { return false; } ValueMarker that = (ValueMarker) obj; if (this.value != that.value) { return false; } return true; }
ValueMarker extends Marker { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof ValueMarker)) { return false; } ValueMarker that = (ValueMarker) obj; if (this.value != that.value) { return false; } return true; } }
ValueMarker extends Marker { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof ValueMarker)) { return false; } ValueMarker that = (ValueMarker) obj; if (this.value != that.value) { return false; } return true; } ValueMarker(double value);  ValueMarker(double value, Paint paint, Stroke stroke);  ValueMarker(double value, Paint paint, Stroke stroke,
                       Paint outlinePaint, Stroke outlineStroke, float alpha); }
ValueMarker extends Marker { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof ValueMarker)) { return false; } ValueMarker that = (ValueMarker) obj; if (this.value != that.value) { return false; } return true; } ValueMarker(double value);  ValueMarker(double value, Paint paint, Stroke stroke);  ValueMarker(double value, Paint paint, Stroke stroke,
                       Paint outlinePaint, Stroke outlineStroke, float alpha); double getValue(); void setValue(double value); @Override boolean equals(Object obj); }
ValueMarker extends Marker { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!super.equals(obj)) { return false; } if (!(obj instanceof ValueMarker)) { return false; } ValueMarker that = (ValueMarker) obj; if (this.value != that.value) { return false; } return true; } ValueMarker(double value);  ValueMarker(double value, Paint paint, Stroke stroke);  ValueMarker(double value, Paint paint, Stroke stroke,
                       Paint outlinePaint, Stroke outlineStroke, float alpha); double getValue(); void setValue(double value); @Override boolean equals(Object obj);  }