public static BloomFilterAlgorithm BLOCK(SplitBlockAlgorithm value) { BloomFilterAlgorithm x = new BloomFilterAlgorithm(); x.setBLOCK(value); return x; }
public boolean equals(java.lang.Object other) { if (other instanceof BloomFilterAlgorithm) { return equals((BloomFilterAlgorithm)other); } else { return false; } }
/** * Block-based Bloom filter. * */ public SplitBlockAlgorithm getBLOCK() { if (getSetField() == _Fields.BLOCK) { return (SplitBlockAlgorithm)getFieldValue(); } else { throw new java.lang.RuntimeException("Cannot get field 'BLOCK' because union is currently set to " + getFieldDesc(getSetField()).name); } }
public boolean equals(BloomFilterAlgorithm other) { return other != null && getSetField() == other.getSetField() && getFieldValue().equals(other.getFieldValue()); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, BloomFilterPageHeader struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.numBytes = iprot.readI32(); struct.setNumBytesIsSet(true); struct.algorithm = new BloomFilterAlgorithm(); struct.algorithm.read(iprot); struct.setAlgorithmIsSet(true); struct.hash = new BloomFilterHash(); struct.hash.read(iprot); struct.setHashIsSet(true); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, BloomFilterPageHeader struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot; oprot.writeI32(struct.numBytes); struct.algorithm.write(oprot); struct.hash.write(oprot); }
public BloomFilterAlgorithm deepCopy() { return new BloomFilterAlgorithm(this); }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException { try { read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
@Override public int hashCode() { int hashCode = 1; hashCode = hashCode * 8191 + numBytes; hashCode = hashCode * 8191 + ((isSetAlgorithm()) ? 131071 : 524287); if (isSetAlgorithm()) hashCode = hashCode * 8191 + algorithm.hashCode(); hashCode = hashCode * 8191 + ((isSetHash()) ? 131071 : 524287); if (isSetHash()) hashCode = hashCode * 8191 + hash.hashCode(); return hashCode; }
@Override public int compareTo(BloomFilterAlgorithm other) { int lastComparison = org.apache.thrift.TBaseHelper.compareTo(getSetField(), other.getSetField()); if (lastComparison == 0) { return org.apache.thrift.TBaseHelper.compareTo(getFieldValue(), other.getFieldValue()); } return lastComparison; }
case 2: // ALGORITHM if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.algorithm = new BloomFilterAlgorithm(); struct.algorithm.read(iprot); struct.setAlgorithmIsSet(true); } else {
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } }
/** * Performs a deep copy on <i>other</i>. */ public BloomFilterPageHeader(BloomFilterPageHeader other) { __isset_bitfield = other.__isset_bitfield; this.numBytes = other.numBytes; if (other.isSetAlgorithm()) { this.algorithm = new BloomFilterAlgorithm(other.algorithm); } if (other.isSetHash()) { this.hash = new BloomFilterHash(other.hash); } }
@Override public int hashCode() { java.util.List<java.lang.Object> list = new java.util.ArrayList<java.lang.Object>(); list.add(this.getClass().getName()); org.apache.thrift.TFieldIdEnum setField = getSetField(); if (setField != null) { list.add(setField.getThriftFieldId()); java.lang.Object value = getFieldValue(); if (value instanceof org.apache.thrift.TEnum) { list.add(((org.apache.thrift.TEnum)getFieldValue()).getValue()); } else { list.add(value); } } return list.hashCode(); } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
public void write(org.apache.thrift.protocol.TProtocol oprot, BloomFilterPageHeader struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(NUM_BYTES_FIELD_DESC); oprot.writeI32(struct.numBytes); oprot.writeFieldEnd(); if (struct.algorithm != null) { oprot.writeFieldBegin(ALGORITHM_FIELD_DESC); struct.algorithm.write(oprot); oprot.writeFieldEnd(); } if (struct.hash != null) { oprot.writeFieldBegin(HASH_FIELD_DESC); struct.hash.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }
if (!(this_present_algorithm && that_present_algorithm)) return false; if (!this.algorithm.equals(that.algorithm)) return false;