org.apache.hadoop.hive.serde2.thrift.test.SetIntString Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hive-apache Show documentation
Show all versions of hive-apache Show documentation
Shaded version of Apache Hive for Presto
The newest version!
/**
* Autogenerated by Thrift Compiler (0.9.3)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.hadoop.hive.serde2.thrift.test;
import org.apache.thrift.scheme.IScheme;
import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
import org.apache.thrift.protocol.TTupleProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.EncodingUtils;
import org.apache.thrift.TException;
import org.apache.thrift.async.AsyncMethodCallback;
import org.apache.thrift.server.AbstractNonblockingServer.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import javax.annotation.Generated;
import io.prestosql.hive.$internal.org.slf4j.Logger;
import io.prestosql.hive.$internal.org.slf4j.LoggerFactory;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)")
public class SetIntString implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SetIntString");
private static final org.apache.thrift.protocol.TField S_INT_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("sIntString", org.apache.thrift.protocol.TType.SET, (short)1);
private static final org.apache.thrift.protocol.TField A_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("aString", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new SetIntStringStandardSchemeFactory());
schemes.put(TupleScheme.class, new SetIntStringTupleSchemeFactory());
}
private Set sIntString; // required
private String aString; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
S_INT_STRING((short)1, "sIntString"),
A_STRING((short)2, "aString");
private static final Map byName = new HashMap();
static {
for (_Fields field : EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
switch(fieldId) {
case 1: // S_INT_STRING
return S_INT_STRING;
case 2: // A_STRING
return A_STRING;
default:
return null;
}
}
/**
* Find the _Fields constant that matches fieldId, throwing an exception
* if it is not found.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
public static _Fields findByName(String name) {
return byName.get(name);
}
private final short _thriftId;
private final String _fieldName;
_Fields(short thriftId, String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
public short getThriftFieldId() {
return _thriftId;
}
public String getFieldName() {
return _fieldName;
}
}
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.S_INT_STRING, new org.apache.thrift.meta_data.FieldMetaData("sIntString", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IntString.class))));
tmpMap.put(_Fields.A_STRING, new org.apache.thrift.meta_data.FieldMetaData("aString", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SetIntString.class, metaDataMap);
}
public SetIntString() {
}
public SetIntString(
Set sIntString,
String aString)
{
this();
this.sIntString = sIntString;
this.aString = aString;
}
/**
* Performs a deep copy on other.
*/
public SetIntString(SetIntString other) {
if (other.isSetSIntString()) {
Set __this__sIntString = new HashSet(other.sIntString.size());
for (IntString other_element : other.sIntString) {
__this__sIntString.add(new IntString(other_element));
}
this.sIntString = __this__sIntString;
}
if (other.isSetAString()) {
this.aString = other.aString;
}
}
public SetIntString deepCopy() {
return new SetIntString(this);
}
@Override
public void clear() {
this.sIntString = null;
this.aString = null;
}
public int getSIntStringSize() {
return (this.sIntString == null) ? 0 : this.sIntString.size();
}
public java.util.Iterator getSIntStringIterator() {
return (this.sIntString == null) ? null : this.sIntString.iterator();
}
public void addToSIntString(IntString elem) {
if (this.sIntString == null) {
this.sIntString = new HashSet();
}
this.sIntString.add(elem);
}
public Set getSIntString() {
return this.sIntString;
}
public void setSIntString(Set sIntString) {
this.sIntString = sIntString;
}
public void unsetSIntString() {
this.sIntString = null;
}
/** Returns true if field sIntString is set (has been assigned a value) and false otherwise */
public boolean isSetSIntString() {
return this.sIntString != null;
}
public void setSIntStringIsSet(boolean value) {
if (!value) {
this.sIntString = null;
}
}
public String getAString() {
return this.aString;
}
public void setAString(String aString) {
this.aString = aString;
}
public void unsetAString() {
this.aString = null;
}
/** Returns true if field aString is set (has been assigned a value) and false otherwise */
public boolean isSetAString() {
return this.aString != null;
}
public void setAStringIsSet(boolean value) {
if (!value) {
this.aString = null;
}
}
public void setFieldValue(_Fields field, Object value) {
switch (field) {
case S_INT_STRING:
if (value == null) {
unsetSIntString();
} else {
setSIntString((Set)value);
}
break;
case A_STRING:
if (value == null) {
unsetAString();
} else {
setAString((String)value);
}
break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
case S_INT_STRING:
return getSIntString();
case A_STRING:
return getAString();
}
throw new IllegalStateException();
}
/** 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 S_INT_STRING:
return isSetSIntString();
case A_STRING:
return isSetAString();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
if (that == null)
return false;
if (that instanceof SetIntString)
return this.equals((SetIntString)that);
return false;
}
public boolean equals(SetIntString that) {
if (that == null)
return false;
boolean this_present_sIntString = true && this.isSetSIntString();
boolean that_present_sIntString = true && that.isSetSIntString();
if (this_present_sIntString || that_present_sIntString) {
if (!(this_present_sIntString && that_present_sIntString))
return false;
if (!this.sIntString.equals(that.sIntString))
return false;
}
boolean this_present_aString = true && this.isSetAString();
boolean that_present_aString = true && that.isSetAString();
if (this_present_aString || that_present_aString) {
if (!(this_present_aString && that_present_aString))
return false;
if (!this.aString.equals(that.aString))
return false;
}
return true;
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy