public TimeType deepCopy() { return new TimeType(this); }
@Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TimeType) return this.equals((TimeType)that); return false; }
public java.lang.Object getFieldValue(_Fields field) { switch (field) { case IS_ADJUSTED_TO_UTC: return isIsAdjustedToUTC(); case UNIT: return getUnit(); } throw new java.lang.IllegalStateException(); }
public void setFieldValue(_Fields field, Object value) { switch (field) { case IS_ADJUSTED_TO_UTC: if (value == null) { unsetIsAdjustedToUTC(); } else { setIsAdjustedToUTC((Boolean)value); } break; case UNIT: if (value == null) { unsetUnit(); } else { setUnit((TimeUnit)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 IS_ADJUSTED_TO_UTC: return isSetIsAdjustedToUTC(); case UNIT: return isSetUnit(); } throw new IllegalStateException(); }
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isAdjustedToUTC = iprot.readBool(); struct.setIsAdjustedToUTCIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.unit = new TimeUnit(); struct.unit.read(iprot); struct.setUnitIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetIsAdjustedToUTC()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAdjustedToUTC' was not found in serialized data! Struct: " + toString()); struct.validate();
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TimeType struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot; struct.isAdjustedToUTC = iprot.readBool(); struct.setIsAdjustedToUTCIsSet(true); struct.unit = new TimeUnit(); struct.unit.read(iprot); struct.setUnitIsSet(true); } }
public TimeType setIsAdjustedToUTC(boolean isAdjustedToUTC) { this.isAdjustedToUTC = isAdjustedToUTC; setIsAdjustedToUTCIsSet(true); return this; }
private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.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, java.lang.Object value) { switch (field) { case IS_ADJUSTED_TO_UTC: if (value == null) { unsetIsAdjustedToUTC(); } else { setIsAdjustedToUTC((java.lang.Boolean)value); } break; case UNIT: if (value == null) { unsetUnit(); } else { setUnit((TimeUnit)value); } break; } }
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) { struct.isAdjustedToUTC = iprot.readBool(); struct.setIsAdjustedToUTCIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); struct.unit = new TimeUnit(); struct.unit.read(iprot); struct.setUnitIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); if (!struct.isSetIsAdjustedToUTC()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'isAdjustedToUTC' 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 java.lang.IllegalArgumentException(); } switch (field) { case IS_ADJUSTED_TO_UTC: return isSetIsAdjustedToUTC(); case UNIT: return isSetUnit(); } throw new java.lang.IllegalStateException(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, TimeType struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; struct.isAdjustedToUTC = iprot.readBool(); struct.setIsAdjustedToUTCIsSet(true); struct.unit = new TimeUnit(); struct.unit.read(iprot); struct.setUnitIsSet(true); } }
public TimeType( boolean isAdjustedToUTC, TimeUnit unit) { this(); this.isAdjustedToUTC = isAdjustedToUTC; setIsAdjustedToUTCIsSet(true); this.unit = unit; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_isAdjustedToUTC = true; list.add(present_isAdjustedToUTC); if (present_isAdjustedToUTC) list.add(isAdjustedToUTC); boolean present_unit = true && (isSetUnit()); list.add(present_unit); if (present_unit) list.add(unit); return list.hashCode(); }
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); } }