@Override public void markDirty() { onChanged(); } }
/** * Merges the field from another field. * * @param value the value to merge from * @return the builder */ public SingleFieldBuilderV3<MType, BType, IType> mergeFrom( MType value) { if (builder == null && message == message.getDefaultInstanceForType()) { message = value; } else { getBuilder().mergeFrom(value); } onChanged(); return this; }
/** * Sets a message for the field replacing any existing value. * * @param message the message to set * @return the builder */ public SingleFieldBuilderV3<MType, BType, IType> setMessage( MType message) { this.message = checkNotNull(message); if (builder != null) { builder.dispose(); builder = null; } onChanged(); return this; }
/** * Clears the value of the field. * * @return the builder */ @SuppressWarnings("unchecked") public SingleFieldBuilderV3<MType, BType, IType> clear() { message = (MType) (message != null ? message.getDefaultInstanceForType() : builder.getDefaultInstanceForType()); if (builder != null) { builder.dispose(); builder = null; } onChanged(); return this; }
@Override public void markDirty() { onChanged(); } }
/** * Sets a message for the field replacing any existing value. * * @param message the message to set * @return the builder */ public SingleFieldBuilderV3<MType, BType, IType> setMessage( MType message) { if (message == null) { throw new NullPointerException(); } this.message = message; if (builder != null) { builder.dispose(); builder = null; } onChanged(); return this; }
/** * Merges the field from another field. * * @param value the value to merge from * @return the builder */ public SingleFieldBuilderV3<MType, BType, IType> mergeFrom( MType value) { if (builder == null && message == message.getDefaultInstanceForType()) { message = value; } else { getBuilder().mergeFrom(value); } onChanged(); return this; }
/** * Clears the value of the field. * * @return the builder */ @SuppressWarnings("unchecked") public SingleFieldBuilderV3<MType, BType, IType> clear() { message = (MType) (message != null ? message.getDefaultInstanceForType() : builder.getDefaultInstanceForType()); if (builder != null) { builder.dispose(); builder = null; } onChanged(); return this; }