public Log deepCopy() { return new Log(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Log) return this.equals((Log)that); return false; }
public Object getFieldValue(_Fields field) { switch (field) { case TIMESTAMP: return Long.valueOf(getTimestamp()); case FIELDS: return getFields(); } throw new IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case TIMESTAMP: if (value == null) { unsetTimestamp(); } else { setTimestamp((Long)value); } break; case FIELDS: if (value == null) { unsetFields(); } else { setFields((List<Tag>)value); } break; } }
/** 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 TIMESTAMP: return isSetTimestamp(); case FIELDS: return isSetFields(); } throw new IllegalStateException(); }
if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.setFieldsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetTimestamp()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'timestamp' was not found in serialized data! Struct: " + toString()); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Log struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.timestamp = iprot.readI64(); struct.setTimestampIsSet(true); { org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32()); struct.fields = new ArrayList<Tag>(_list5.size); Tag _elem6; for (int _i7 = 0; _i7 < _list5.size; ++_i7) { _elem6 = new Tag(); _elem6.read(iprot); struct.fields.add(_elem6); } } struct.setFieldsIsSet(true); } }
public boolean equals(Log that) { if (that == null) return false; boolean this_present_timestamp = true; boolean that_present_timestamp = true; if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_fields = true && this.isSetFields(); boolean that_present_fields = true && that.isSetFields(); if (this_present_fields || that_present_fields) { if (!(this_present_fields && that_present_fields)) return false; if (!this.fields.equals(that.fields)) return false; } return true; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; 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 compareTo(Log other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } if (isSetTimestamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFields()).compareTo(other.isSetFields()); if (lastComparison != 0) { return lastComparison; } if (isSetFields()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fields, other.fields); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_timestamp = true; list.add(present_timestamp); if (present_timestamp) list.add(timestamp); boolean present_fields = true && (isSetFields()); list.add(present_fields); if (present_fields) list.add(fields); return list.hashCode(); }
List<Log> __this__logs = new ArrayList<Log>(other.logs.size()); for (Log other_element : other.logs) { __this__logs.add(new Log(other_element));
/** * Performs a deep copy on <i>other</i>. */ public Log(Log other) { __isset_bitfield = other.__isset_bitfield; this.timestamp = other.timestamp; if (other.isSetFields()) { List<Tag> __this__fields = new ArrayList<Tag>(other.fields.size()); for (Tag other_element : other.fields) { __this__fields.add(new Tag(other_element)); } this.fields = __this__fields; } }