/** 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 SECS_SINCE_EPOCH: return isSetSecsSinceEpoch(); case NANOS: return isSetNanos(); } throw new IllegalStateException(); }
@Override public int compareTo(Timestamp other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetSecsSinceEpoch()).compareTo(other.isSetSecsSinceEpoch()); if (lastComparison != 0) { return lastComparison; } if (isSetSecsSinceEpoch()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.secsSinceEpoch, other.secsSinceEpoch); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetNanos()).compareTo(other.isSetNanos()); if (lastComparison != 0) { return lastComparison; } if (isSetNanos()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.nanos, other.nanos); if (lastComparison != 0) { return lastComparison; } } return 0; }
if (!struct.isSetSecsSinceEpoch()) { throw new org.apache.thrift.protocol.TProtocolException("Required field 'secsSinceEpoch' was not found in serialized data! Struct: " + toString());