public boolean equals(TPathsDump that) { if (that == null) return false; boolean this_present_rootId = true; boolean that_present_rootId = true; if (this_present_rootId || that_present_rootId) { if (!(this_present_rootId && that_present_rootId)) return false; if (this.rootId != that.rootId) return false; } boolean this_present_nodeMap = true && this.isSetNodeMap(); boolean that_present_nodeMap = true && that.isSetNodeMap(); if (this_present_nodeMap || that_present_nodeMap) { if (!(this_present_nodeMap && that_present_nodeMap)) return false; if (!this.nodeMap.equals(that.nodeMap)) return false; } return true; }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_rootId = true; builder.append(present_rootId); if (present_rootId) builder.append(rootId); boolean present_nodeMap = true && (isSetNodeMap()); builder.append(present_nodeMap); if (present_nodeMap) builder.append(nodeMap); return builder.toHashCode(); }
/** 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 ROOT_ID: return isSetRootId(); case NODE_MAP: return isSetNodeMap(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public TPathsDump(TPathsDump other) { __isset_bitfield = other.__isset_bitfield; this.rootId = other.rootId; if (other.isSetNodeMap()) { Map<Integer,TPathEntry> __this__nodeMap = new HashMap<Integer,TPathEntry>(); for (Map.Entry<Integer, TPathEntry> other_element : other.nodeMap.entrySet()) { Integer other_element_key = other_element.getKey(); TPathEntry other_element_value = other_element.getValue(); Integer __this__nodeMap_copy_key = other_element_key; TPathEntry __this__nodeMap_copy_value = new TPathEntry(other_element_value); __this__nodeMap.put(__this__nodeMap_copy_key, __this__nodeMap_copy_value); } this.nodeMap = __this__nodeMap; } }
public int compareTo(TPathsDump other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TPathsDump typedOther = (TPathsDump)other; lastComparison = Boolean.valueOf(isSetRootId()).compareTo(typedOther.isSetRootId()); if (lastComparison != 0) { return lastComparison; } if (isSetRootId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rootId, typedOther.rootId); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNodeMap()).compareTo(typedOther.isSetNodeMap()); if (lastComparison != 0) { return lastComparison; } if (isSetNodeMap()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nodeMap, typedOther.nodeMap); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void validate() throws org.apache.thrift.TException { // check for required fields if (!isSetRootId()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'rootId' is unset! Struct:" + toString()); } if (!isSetNodeMap()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'nodeMap' is unset! Struct:" + toString()); } // check for sub-struct validity }