/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new java.lang.IllegalArgumentException(); } switch (field) { case OLD_TABLET: return isSetOldTablet(); case NEW_TABLETS: return isSetNewTablets(); } throw new java.lang.IllegalStateException(); }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetOldTablet()) ? 131071 : 524287); if (isSetOldTablet()) hashCode = hashCode * 8191 + oldTablet.hashCode(); hashCode = hashCode * 8191 + ((isSetNewTablets()) ? 131071 : 524287); if (isSetNewTablets()) hashCode = hashCode * 8191 + newTablets.hashCode(); return hashCode; }
@Override public int compareTo(TabletSplit other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(isSetOldTablet()).compareTo(other.isSetOldTablet()); if (lastComparison != 0) { return lastComparison; } if (isSetOldTablet()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oldTablet, other.oldTablet); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.valueOf(isSetNewTablets()).compareTo(other.isSetNewTablets()); if (lastComparison != 0) { return lastComparison; } if (isSetNewTablets()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newTablets, other.newTablets); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(TabletSplit that) { if (that == null) return false; if (this == that) return true; boolean this_present_oldTablet = true && this.isSetOldTablet(); boolean that_present_oldTablet = true && that.isSetOldTablet(); if (this_present_oldTablet || that_present_oldTablet) { if (!(this_present_oldTablet && that_present_oldTablet)) return false; if (!this.oldTablet.equals(that.oldTablet)) return false; } boolean this_present_newTablets = true && this.isSetNewTablets(); boolean that_present_newTablets = true && that.isSetNewTablets(); if (this_present_newTablets || that_present_newTablets) { if (!(this_present_newTablets && that_present_newTablets)) return false; if (!this.newTablets.equals(that.newTablets)) return false; } return true; }
/** * Performs a deep copy on <i>other</i>. */ public TabletSplit(TabletSplit other) { if (other.isSetOldTablet()) { this.oldTablet = new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(other.oldTablet); } if (other.isSetNewTablets()) { java.util.List<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent> __this__newTablets = new java.util.ArrayList<org.apache.accumulo.core.dataImpl.thrift.TKeyExtent>(other.newTablets.size()); for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent other_element : other.newTablets) { __this__newTablets.add(new org.apache.accumulo.core.dataImpl.thrift.TKeyExtent(other_element)); } this.newTablets = __this__newTablets; } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TabletSplit struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetOldTablet()) { optionals.set(0); } if (struct.isSetNewTablets()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetOldTablet()) { struct.oldTablet.write(oprot); } if (struct.isSetNewTablets()) { { oprot.writeI32(struct.newTablets.size()); for (org.apache.accumulo.core.dataImpl.thrift.TKeyExtent _iter82 : struct.newTablets) { _iter82.write(oprot); } } } }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case OLD_TABLET: return isSetOldTablet(); case NEW_TABLETS: return isSetNewTablets(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_oldTablet = true && (isSetOldTablet()); list.add(present_oldTablet); if (present_oldTablet) list.add(oldTablet); boolean present_newTablets = true && (isSetNewTablets()); list.add(present_newTablets); if (present_newTablets) list.add(newTablets); return list.hashCode(); }
@Override public int compareTo(TabletSplit other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetOldTablet()).compareTo(other.isSetOldTablet()); if (lastComparison != 0) { return lastComparison; } if (isSetOldTablet()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oldTablet, other.oldTablet); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNewTablets()).compareTo(other.isSetNewTablets()); if (lastComparison != 0) { return lastComparison; } if (isSetNewTablets()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.newTablets, other.newTablets); if (lastComparison != 0) { return lastComparison; } } return 0; }
/** * Performs a deep copy on <i>other</i>. */ public TabletSplit(TabletSplit other) { if (other.isSetOldTablet()) { this.oldTablet = new org.apache.accumulo.core.data.thrift.TKeyExtent(other.oldTablet); } if (other.isSetNewTablets()) { List<org.apache.accumulo.core.data.thrift.TKeyExtent> __this__newTablets = new ArrayList<org.apache.accumulo.core.data.thrift.TKeyExtent>(other.newTablets.size()); for (org.apache.accumulo.core.data.thrift.TKeyExtent other_element : other.newTablets) { __this__newTablets.add(new org.apache.accumulo.core.data.thrift.TKeyExtent(other_element)); } this.newTablets = __this__newTablets; } }
public boolean equals(TabletSplit that) { if (that == null) return false; boolean this_present_oldTablet = true && this.isSetOldTablet(); boolean that_present_oldTablet = true && that.isSetOldTablet(); if (this_present_oldTablet || that_present_oldTablet) { if (!(this_present_oldTablet && that_present_oldTablet)) return false; if (!this.oldTablet.equals(that.oldTablet)) return false; } boolean this_present_newTablets = true && this.isSetNewTablets(); boolean that_present_newTablets = true && that.isSetNewTablets(); if (this_present_newTablets || that_present_newTablets) { if (!(this_present_newTablets && that_present_newTablets)) return false; if (!this.newTablets.equals(that.newTablets)) return false; } return true; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TabletSplit struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetOldTablet()) { optionals.set(0); } if (struct.isSetNewTablets()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetOldTablet()) { struct.oldTablet.write(oprot); } if (struct.isSetNewTablets()) { { oprot.writeI32(struct.newTablets.size()); for (org.apache.accumulo.core.data.thrift.TKeyExtent _iter82 : struct.newTablets) { _iter82.write(oprot); } } } }