com.cinchapi.concourse.thrift.TCriteria Maven / Gradle / Ivy
/**
* Autogenerated by Thrift Compiler (0.9.2)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
*
* @generated
*/
package com.cinchapi.concourse.thrift;
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 org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@SuppressWarnings({ "cast", "rawtypes", "serial", "unchecked", "unused" })
/**
* A representation for a Criteria that can be passed over the wire via
* Thrift. Once passed over the write, the server goes through the list
* of TSymbols and converts them to actual Symbol objects which can then
* be used in the shunting-yard algorithm.
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2015-2-22")
public class TCriteria implements
org.apache.thrift.TBase,
java.io.Serializable,
Cloneable,
Comparable {
// isset id assignments
public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
private static final Map, SchemeFactory> schemes = new HashMap, SchemeFactory>();
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct(
"TCriteria");
private static final org.apache.thrift.protocol.TField SYMBOLS_FIELD_DESC = new org.apache.thrift.protocol.TField(
"symbols", org.apache.thrift.protocol.TType.LIST, (short) 1);
static {
schemes.put(StandardScheme.class, new TCriteriaStandardSchemeFactory());
schemes.put(TupleScheme.class, new TCriteriaTupleSchemeFactory());
}
static {
Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(
_Fields.class);
tmpMap.put(
_Fields.SYMBOLS,
new org.apache.thrift.meta_data.FieldMetaData(
"symbols",
org.apache.thrift.TFieldRequirementType.REQUIRED,
new org.apache.thrift.meta_data.ListMetaData(
org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.StructMetaData(
org.apache.thrift.protocol.TType.STRUCT,
TSymbol.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(
TCriteria.class, metaDataMap);
}
public List symbols; // required
public TCriteria() {}
public TCriteria(List symbols) {
this();
this.symbols = symbols;
}
/**
* Performs a deep copy on other.
*/
public TCriteria(TCriteria other) {
if(other.isSetSymbols()) {
List __this__symbols = new ArrayList(
other.symbols.size());
for (TSymbol other_element : other.symbols) {
__this__symbols.add(new TSymbol(other_element));
}
this.symbols = __this__symbols;
}
}
public void addToSymbols(TSymbol elem) {
if(this.symbols == null) {
this.symbols = new ArrayList();
}
this.symbols.add(elem);
}
@Override
public void clear() {
this.symbols = null;
}
@Override
public int compareTo(TCriteria other) {
if(!getClass().equals(other.getClass())) {
return getClass().getName().compareTo(other.getClass().getName());
}
int lastComparison = 0;
lastComparison = Boolean.valueOf(isSetSymbols()).compareTo(
other.isSetSymbols());
if(lastComparison != 0) {
return lastComparison;
}
if(isSetSymbols()) {
lastComparison = org.apache.thrift.TBaseHelper.compareTo(
this.symbols, other.symbols);
if(lastComparison != 0) {
return lastComparison;
}
}
return 0;
}
public TCriteria deepCopy() {
return new TCriteria(this);
}
@Override
public boolean equals(Object that) {
if(that == null)
return false;
if(that instanceof TCriteria)
return this.equals((TCriteria) that);
return false;
}
public boolean equals(TCriteria that) {
if(that == null)
return false;
boolean this_present_symbols = true && this.isSetSymbols();
boolean that_present_symbols = true && that.isSetSymbols();
if(this_present_symbols || that_present_symbols) {
if(!(this_present_symbols && that_present_symbols))
return false;
if(!this.symbols.equals(that.symbols))
return false;
}
return true;
}
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
public Object getFieldValue(_Fields field) {
switch (field) {
case SYMBOLS:
return getSymbols();
}
throw new IllegalStateException();
}
public List getSymbols() {
return this.symbols;
}
public java.util.Iterator getSymbolsIterator() {
return (this.symbols == null) ? null : this.symbols.iterator();
}
public int getSymbolsSize() {
return (this.symbols == null) ? 0 : this.symbols.size();
}
@Override
public int hashCode() {
List © 2015 - 2025 Weber Informatics LLC | Privacy Policy