@Override public int hashCode() { return Objects.hash(center, radius, unit.ordinal()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } CircleBuilder other = (CircleBuilder) obj; return Objects.equals(center, other.center) && Objects.equals(radius, other.radius) && Objects.equals(unit.ordinal(), other.unit.ordinal()); } }
/** * Write a {@link DistanceUnit} to a {@link StreamOutput}. * * @param out {@link StreamOutput} to write to */ @Override public void writeTo(StreamOutput out) throws IOException { out.writeByte((byte) this.ordinal()); } }
@Override public int hashCode() { return Objects.hash(center, radius, unit.ordinal()); }
@Override public int hashCode() { return Objects.hash(center, radius, unit.ordinal()); }
@Override public int hashCode() { return Objects.hash(center, radius, unit.ordinal()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } CircleBuilder other = (CircleBuilder) obj; return Objects.equals(center, other.center) && Objects.equals(radius, other.radius) && Objects.equals(unit.ordinal(), other.unit.ordinal()); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } CircleBuilder other = (CircleBuilder) obj; return Objects.equals(center, other.center) && Objects.equals(radius, other.radius) && Objects.equals(unit.ordinal(), other.unit.ordinal()); } }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } CircleBuilder other = (CircleBuilder) obj; return Objects.equals(center, other.center) && Objects.equals(radius, other.radius) && Objects.equals(unit.ordinal(), other.unit.ordinal()); } }
/** * Write a {@link DistanceUnit} to a {@link StreamOutput} * * @param out {@link StreamOutput} to write to * @param unit {@link DistanceUnit} to write */ public static void writeDistanceUnit(StreamOutput out, DistanceUnit unit) throws IOException { out.writeByte((byte) unit.ordinal()); }
/** * Write a {@link DistanceUnit} to a {@link StreamOutput}. * * @param out {@link StreamOutput} to write to */ @Override public void writeTo(StreamOutput out) throws IOException { out.writeByte((byte) this.ordinal()); } }
/** * Write a {@link DistanceUnit} to a {@link StreamOutput}. * * @param out {@link StreamOutput} to write to */ @Override public void writeTo(StreamOutput out) throws IOException { out.writeByte((byte) this.ordinal()); } }
/** * Write a {@link DistanceUnit} to a {@link StreamOutput}. * * @param out {@link StreamOutput} to write to */ @Override public void writeTo(StreamOutput out) throws IOException { out.writeByte((byte) this.ordinal()); } }