diff --git a/addon/src/main/java/com/vaadin/addon/charts/model/ChartType.java b/addon/src/main/java/com/vaadin/addon/charts/model/ChartType.java index 405dc7fe0..2c691e3d7 100644 --- a/addon/src/main/java/com/vaadin/addon/charts/model/ChartType.java +++ b/addon/src/main/java/com/vaadin/addon/charts/model/ChartType.java @@ -156,4 +156,19 @@ protected ChartType(String type) { public String toString() { return type; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof ChartType)) return false; + + ChartType chartType = (ChartType) o; + + return type != null ? type.equals(chartType.type) : chartType.type == null; + } + + @Override + public int hashCode() { + return type != null ? type.hashCode() : 0; + } }