2 * Copyright 2017-2018 Gregory Moyer and contributors.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.openhab.binding.lametrictime.api.local.model;
20 private Integer start;
21 private Integer current;
25 public Integer getStart()
30 public void setStart(Integer start)
35 public GoalData withStart(Integer start)
41 public Integer getCurrent()
46 public void setCurrent(Integer current)
48 this.current = current;
51 public GoalData withCurrent(Integer current)
53 this.current = current;
57 public Integer getEnd()
62 public void setEnd(Integer end)
67 public GoalData withEnd(Integer end)
73 public String getUnit()
78 public void setUnit(String unit)
83 public GoalData withUnit(String unit)
94 result = prime * result + ((current == null) ? 0 : current.hashCode());
95 result = prime * result + ((end == null) ? 0 : end.hashCode());
96 result = prime * result + ((start == null) ? 0 : start.hashCode());
97 result = prime * result + ((unit == null) ? 0 : unit.hashCode());
102 public boolean equals(Object obj)
112 if (getClass() != obj.getClass())
116 GoalData other = (GoalData)obj;
119 if (other.current != null)
124 else if (!current.equals(other.current))
130 if (other.end != null)
135 else if (!end.equals(other.end))
141 if (other.start != null)
146 else if (!start.equals(other.start))
152 if (other.unit != null)
157 else if (!unit.equals(other.unit))
165 public String toString()
167 StringBuilder builder = new StringBuilder();
168 builder.append("GoalData [start=");
169 builder.append(start);
170 builder.append(", current=");
171 builder.append(current);
172 builder.append(", end=");
174 builder.append(", unit=");
175 builder.append(unit);
177 return builder.toString();