package com.onaro.util.jfc.tables.filter.matcher; public class MatchRange { private int from; private int to; /** * Range in the value that matched the filter pattern * @param from first index of the range. inclusive * @param to last index of the range. exclusive */ public MatchRange(int from, int to) { this.from = from; this.to = to; } public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final MatchRange that = (MatchRange) o; if (from != that.from) return false; if (to != that.to) return false; return true; } public int hashCode() { int result; result = from; result = 29 * result + to; return result; } public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("MatchRange"); //$NON-NLS-1$ sb.append("{from=").append(from); //$NON-NLS-1$ sb.append(",to=").append(to); //$NON-NLS-1$ sb.append('}'); return sb.toString(); } public int getFrom() { return from; } public int getTo() { return to; } }