@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + ((isSetNs()) ? 131071 : 524287); if (isSetNs()) hashCode = hashCode * 8191 + ns.hashCode(); hashCode = hashCode * 8191 + ((isSetQualifier()) ? 131071 : 524287); if (isSetQualifier()) hashCode = hashCode * 8191 + qualifier.hashCode(); return hashCode; }
/** 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 NS: return isSetNs(); case QUALIFIER: return isSetQualifier(); } throw new java.lang.IllegalStateException(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TTableName struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeBinary(struct.qualifier); java.util.BitSet optionals = new java.util.BitSet(); if (struct.isSetNs()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetNs()) { oprot.writeBinary(struct.ns); } }
public boolean equals(TTableName that) { if (that == null) return false; if (this == that) return true; boolean this_present_ns = true && this.isSetNs(); boolean that_present_ns = true && that.isSetNs(); if (this_present_ns || that_present_ns) { if (!(this_present_ns && that_present_ns)) return false; if (!this.ns.equals(that.ns)) return false; } boolean this_present_qualifier = true && this.isSetQualifier(); boolean that_present_qualifier = true && that.isSetQualifier(); if (this_present_qualifier || that_present_qualifier) { if (!(this_present_qualifier && that_present_qualifier)) return false; if (!this.qualifier.equals(that.qualifier)) return false; } return true; }
@Override public int compareTo(TTableName other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = java.lang.Boolean.valueOf(isSetNs()).compareTo(other.isSetNs()); if (lastComparison != 0) { return lastComparison; } if (isSetNs()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ns, other.ns); if (lastComparison != 0) { return lastComparison; } } lastComparison = java.lang.Boolean.valueOf(isSetQualifier()).compareTo(other.isSetQualifier()); if (lastComparison != 0) { return lastComparison; } if (isSetQualifier()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.qualifier, other.qualifier); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public java.lang.String toString() { java.lang.StringBuilder sb = new java.lang.StringBuilder("TTableName("); boolean first = true; if (isSetNs()) { sb.append("ns:"); if (this.ns == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.ns, sb); } first = false; } if (!first) sb.append(", "); sb.append("qualifier:"); if (this.qualifier == null) { sb.append("null"); } else { org.apache.thrift.TBaseHelper.toString(this.qualifier, sb); } first = false; sb.append(")"); return sb.toString(); }
public void write(org.apache.thrift.protocol.TProtocol oprot, TTableName struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.ns != null) { if (struct.isSetNs()) { oprot.writeFieldBegin(NS_FIELD_DESC); oprot.writeBinary(struct.ns); oprot.writeFieldEnd(); } } if (struct.qualifier != null) { oprot.writeFieldBegin(QUALIFIER_FIELD_DESC); oprot.writeBinary(struct.qualifier); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
/** * Performs a deep copy on <i>other</i>. */ public TTableName(TTableName other) { if (other.isSetNs()) { this.ns = org.apache.thrift.TBaseHelper.copyBinary(other.ns); } if (other.isSetQualifier()) { this.qualifier = org.apache.thrift.TBaseHelper.copyBinary(other.qualifier); } }