
io.mstream.trader.datafeed.handlers.api.dates.data.DateRange Maven / Gradle / Ivy
The newest version!
package io.mstream.trader.datafeed.handlers.api.dates.data;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.inject.assistedinject.Assisted;
import javax.inject.Inject;
public class DateRange {
private final String from;
private final String to;
@Inject
@JsonCreator
public DateRange(
@Assisted("from") @JsonProperty("from") String from,
@Assisted("to") @JsonProperty("to") String to) {
this.from = from;
this.to = to;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
DateRange dateRange = (DateRange) o;
if (from != null ? !from.equals(dateRange.from) : dateRange.from != null)
return false;
return to != null ? to.equals(dateRange.to) : dateRange.to == null;
}
@Override
public int hashCode() {
int result = from != null ? from.hashCode() : 0;
result = 31 * result + (to != null ? to.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "DateRange{" +
"from='" + from + '\'' +
", to='" + to + '\'' +
'}';
}
public String getFrom() {
return from;
}
public String getTo() {
return to;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy