package com.inspect.ivs.base.feign.domain;

public class IndexRange {
   private int fromIndex;
   private int toIndex;

   public int getFromIndex() {
      return this.fromIndex;
   }

   public int getToIndex() {
      return this.toIndex;
   }

   public void setFromIndex(final int fromIndex) {
      this.fromIndex = fromIndex;
   }

   public void setToIndex(final int toIndex) {
      this.toIndex = toIndex;
   }

   public boolean equals(final Object o) {
      if (o == this) {
         return true;
      } else if (!(o instanceof IndexRange)) {
         return false;
      } else {
         IndexRange other = (IndexRange)o;
         if (!other.canEqual(this)) {
            return false;
         } else if (this.getFromIndex() != other.getFromIndex()) {
            return false;
         } else {
            return this.getToIndex() == other.getToIndex();
         }
      }
   }

   protected boolean canEqual(final Object other) {
      return other instanceof IndexRange;
   }

   public int hashCode() {
      int PRIME = 1;
      int result = 1;
      result = result * 59 + this.getFromIndex();
      result = result * 59 + this.getToIndex();
      return result;
   }

   public String toString() {
      return "IndexRange(fromIndex=" + this.getFromIndex() + ", toIndex=" + this.getToIndex() + ")";
   }
}
