@Test public void testTagAndStringHaveSameHashCode() { String base = Random.getString(); TObject string = Convert.javaToThrift(base); TObject tag = Convert.javaToThrift(Tag.create(base)); Assert.assertEquals(tag.hashCode(), string.hashCode()); }
@Override public int hashCode() { return Arrays.hashCode( new int[] { data.hashCode(), getInternalType().ordinal() }); }
TObject implements
        org.apache.thrift.TBase<TObject, TObject._Fields>,
        java.io.Serializable,
        Cloneable,
        Comparable<TObject> { @Override public int hashCode() { return Arrays.hashCode( new int[] { data.hashCode(), getInternalType().ordinal() }); } }
TObject implements
        org.apache.thrift.TBase<TObject, TObject._Fields>,
        java.io.Serializable,
        Cloneable,
        Comparable<TObject> { @Override public int hashCode() { return Arrays.hashCode( new int[] { data.hashCode(), getInternalType().ordinal() }); } TObject();  TObject(ByteBuffer data, Type type);  TObject(TObject other); }
TObject implements
        org.apache.thrift.TBase<TObject, TObject._Fields>,
        java.io.Serializable,
        Cloneable,
        Comparable<TObject> { @Override public int hashCode() { return Arrays.hashCode( new int[] { data.hashCode(), getInternalType().ordinal() }); } TObject();  TObject(ByteBuffer data, Type type);  TObject(TObject other); static Comparator<TObject> comparator(); static Aliases alias(Operator operator, TObject... values); ByteBuffer bufferForData(); @DoNotInvoke TObject cacheServerWrapper(Object serverValue); @Override void clear(); @Override int compareTo(TObject other); int compareToIgnoreCase(TObject other); TObject deepCopy(); @Override boolean equals(Object obj); _Fields fieldForId(int fieldId); byte[] getData(); Object getFieldValue(_Fields field); @Nullable Object getJavaFormat(); @Nullable @DoNotInvoke Object getServerWrapper(); Type getType(); @Override int hashCode(); boolean is(Operator operator, TObject... values); boolean isBlank(); boolean isCharSequenceType(); boolean isIgnoreCase(Operator operator, TObject... values); boolean isSet(_Fields field); boolean isSetData(); boolean isSetType(); boolean matches(TObject other); void read(org.apache.thrift.protocol.TProtocol iprot); TObject setData(byte[] data); TObject setData(ByteBuffer data); void setDataIsSet(boolean value); void setFieldValue(_Fields field, Object value); TObject setJavaFormat(Object java); TObject setType(Type type); void setTypeIsSet(boolean value); @Override String toString(); void unsetData(); void unsetType(); void validate(); void write(org.apache.thrift.protocol.TProtocol oprot); }
TObject implements
        org.apache.thrift.TBase<TObject, TObject._Fields>,
        java.io.Serializable,
        Cloneable,
        Comparable<TObject> { @Override public int hashCode() { return Arrays.hashCode( new int[] { data.hashCode(), getInternalType().ordinal() }); } TObject();  TObject(ByteBuffer data, Type type);  TObject(TObject other); static Comparator<TObject> comparator(); static Aliases alias(Operator operator, TObject... values); ByteBuffer bufferForData(); @DoNotInvoke TObject cacheServerWrapper(Object serverValue); @Override void clear(); @Override int compareTo(TObject other); int compareToIgnoreCase(TObject other); TObject deepCopy(); @Override boolean equals(Object obj); _Fields fieldForId(int fieldId); byte[] getData(); Object getFieldValue(_Fields field); @Nullable Object getJavaFormat(); @Nullable @DoNotInvoke Object getServerWrapper(); Type getType(); @Override int hashCode(); boolean is(Operator operator, TObject... values); boolean isBlank(); boolean isCharSequenceType(); boolean isIgnoreCase(Operator operator, TObject... values); boolean isSet(_Fields field); boolean isSetData(); boolean isSetType(); boolean matches(TObject other); void read(org.apache.thrift.protocol.TProtocol iprot); TObject setData(byte[] data); TObject setData(ByteBuffer data); void setDataIsSet(boolean value); void setFieldValue(_Fields field, Object value); TObject setJavaFormat(Object java); TObject setType(Type type); void setTypeIsSet(boolean value); @Override String toString(); void unsetData(); void unsetType(); void validate(); void write(org.apache.thrift.protocol.TProtocol oprot); static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static final TObject NEGATIVE_INFINITY; static final TObject NULL; static final TObject POSITIVE_INFINITY; public ByteBuffer data; public Type type; }