public SubscriberDto(Subscriber subscriber) { address = subscriber.getAddress(); port = subscriber.getPort(); }
public Subscriber deepCopy() { return new Subscriber(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Subscriber) return this.equals((Subscriber)that); return false; }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ADDRESS: if (value == null) { unsetAddress(); } else { setAddress((String)value); } break; case PORT: if (value == null) { unsetPort(); } else { setPort((Integer)value); } break; } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.address = iprot.readString(); struct.setAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetPort()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'port' was not found in serialized data! Struct: " + toString()); struct.validate();
/** 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 ADDRESS: return isSetAddress(); case PORT: return isSetPort(); } throw new IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Subscriber struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.address = iprot.readString(); struct.setAddressIsSet(true); struct.port = iprot.readI32(); struct.setPortIsSet(true); } }
/** * Performs a deep copy on <i>other</i>. */ public Subscriber(Subscriber other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetAddress()) { this.address = other.address; } this.port = other.port; }
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); } }
public void setFieldValue(_Fields field, Object value) { switch (field) { case ADDRESS: if (value == null) { unsetAddress(); } else { setAddress((String)value); } break; case PORT: if (value == null) { unsetPort(); } else { setPort((Integer)value); } break; } }
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) { struct.address = iprot.readString(); struct.setAddressIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.port = iprot.readI32(); struct.setPortIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetPort()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'port' was not found in serialized data! Struct: " + toString()); struct.validate();
/** 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 ADDRESS: return isSetAddress(); case PORT: return isSetPort(); } throw new IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, Subscriber struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.address = iprot.readString(); struct.setAddressIsSet(true); struct.port = iprot.readI32(); struct.setPortIsSet(true); } }
/** * Performs a deep copy on <i>other</i>. */ public Subscriber(Subscriber other) { __isset_bitfield = other.__isset_bitfield; if (other.isSetAddress()) { this.address = other.address; } this.port = other.port; }
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); } }
public SubscriberDto(Subscriber subscriber) { address = subscriber.getAddress(); port = subscriber.getPort(); }
@Override public int compareTo(Subscriber other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetAddress()).compareTo(other.isSetAddress()); if (lastComparison != 0) { return lastComparison; } if (isSetAddress()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.address, other.address); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort()); if (lastComparison != 0) { return lastComparison; } if (isSetPort()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.port, other.port); if (lastComparison != 0) { return lastComparison; } } return 0; }
public boolean equals(Subscriber that) { if (that == null) return false; boolean this_present_address = true && this.isSetAddress(); boolean that_present_address = true && that.isSetAddress(); if (this_present_address || that_present_address) { if (!(this_present_address && that_present_address)) return false; if (!this.address.equals(that.address)) return false; } boolean this_present_port = true; boolean that_present_port = true; if (this_present_port || that_present_port) { if (!(this_present_port && that_present_port)) return false; if (this.port != that.port) return false; } return true; }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof Subscriber) return this.equals((Subscriber)that); return false; }
public Subscriber deepCopy() { return new Subscriber(this); }