/** * Creates a builder for {@link ImmutableAtoi ImmutableAtoi}. * @return A new ImmutableAtoi builder */ public static ImmutableAtoi.Builder builder() { return new ImmutableAtoi.Builder(); }
/** * Creates a builder for {@link ImmutableStrcmp ImmutableStrcmp}. * @return A new ImmutableStrcmp builder */ public static ImmutableStrcmp.Builder builder() { return new ImmutableStrcmp.Builder(); }
/** * Creates an immutable copy of a {@link Atoi} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable Atoi instance */ public static ImmutableAtoi copyOf(Atoi instance) { if (instance instanceof ImmutableAtoi) { return (ImmutableAtoi) instance; } return ImmutableAtoi.builder() .from(instance) .build(); }
private void from(Object object) { if (object instanceof Function) { Function instance = (Function) object; addAllArgs(instance.getArgs()); returnValue(instance.getReturnValue()); } if (object instanceof Element) { Element instance = (Element) object; name(instance.getName()); Optional<String> descriptionOptional = instance.getDescription(); if (descriptionOptional.isPresent()) { description(descriptionOptional); } } }
private void from(Object object) { if (object instanceof Function) { Function instance = (Function) object; addAllArgs(instance.getArgs()); returnValue(instance.getReturnValue()); } if (object instanceof Element) { Element instance = (Element) object; name(instance.getName()); Optional<String> descriptionOptional = instance.getDescription(); if (descriptionOptional.isPresent()) { description(descriptionOptional); } } }
/** * Creates an immutable copy of a {@link Strcmp} value. * Uses accessors to get values to initialize the new immutable instance. * If an instance is already immutable, it is returned as is. * @param instance The instance to copy * @return A copied immutable Strcmp instance */ public static ImmutableStrcmp copyOf(Strcmp instance) { if (instance instanceof ImmutableStrcmp) { return (ImmutableStrcmp) instance; } return ImmutableStrcmp.builder() .from(instance) .build(); }
/** * Builds a new {@link ImmutableStrcmp ImmutableStrcmp}. * @return An immutable instance of Strcmp * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableStrcmp build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutableStrcmp(args.build(), returnValue, name, description); }
/** * Builds a new {@link ImmutableAtoi ImmutableAtoi}. * @return An immutable instance of Atoi * @throws java.lang.IllegalStateException if any required attributes are missing */ public ImmutableAtoi build() { if (initBits != 0) { throw new IllegalStateException(formatRequiredAttributesMessage()); } return new ImmutableAtoi(args.build(), returnValue, name, description); }
/** * Copy the current immutable object with elements that replace the content of {@link Atoi#getArgs() args}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableAtoi withArgs(String... elements) { ImmutableList<String> newValue = ImmutableList.copyOf(elements); return new ImmutableAtoi(newValue, this.returnValue, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link Strcmp#getArgs() args}. * @param elements The elements to set * @return A modified copy of {@code this} object */ public final ImmutableStrcmp withArgs(String... elements) { ImmutableList<String> newValue = ImmutableList.copyOf(elements); return new ImmutableStrcmp(newValue, this.returnValue, this.name, this.description); }
/** * Fill a builder with attribute values from the provided {@code com.neotys.neoload.model.core.Element} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder from(Element instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }
/** * This instance is equal to all instances of {@code ImmutableAtoi} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; return another instanceof ImmutableAtoi && equalTo((ImmutableAtoi) another); }
/** * This instance is equal to all instances of {@code ImmutableStrcmp} that have equal attribute values. * @return {@code true} if {@code this} is equal to {@code another} instance */ @Override public boolean equals(@Nullable Object another) { if (this == another) return true; return another instanceof ImmutableStrcmp && equalTo((ImmutableStrcmp) another); }
/** * Fill a builder with attribute values from the provided {@code com.neotys.neoload.model.core.Element} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder from(Element instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }
/** * Copy the current immutable object with elements that replace the content of {@link Atoi#getArgs() args}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of args elements to set * @return A modified copy of {@code this} object */ public final ImmutableAtoi withArgs(Iterable<String> elements) { if (this.args == elements) return this; ImmutableList<String> newValue = ImmutableList.copyOf(elements); return new ImmutableAtoi(newValue, this.returnValue, this.name, this.description); }
/** * Copy the current immutable object with elements that replace the content of {@link Strcmp#getArgs() args}. * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}. * @param elements An iterable of args elements to set * @return A modified copy of {@code this} object */ public final ImmutableStrcmp withArgs(Iterable<String> elements) { if (this.args == elements) return this; ImmutableList<String> newValue = ImmutableList.copyOf(elements); return new ImmutableStrcmp(newValue, this.returnValue, this.name, this.description); }
/** * Fill a builder with attribute values from the provided {@code com.neotys.neoload.model.function.Strcmp} instance. * @param instance The instance from which to copy values * @return {@code this} builder for use in a chained invocation */ @CanIgnoreReturnValue public final Builder from(Strcmp instance) { Objects.requireNonNull(instance, "instance"); from((Object) instance); return this; }
/** * Copy the current immutable object by setting a value for the {@link Atoi#getName() name} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for name * @return A modified copy of the {@code this} object */ public final ImmutableAtoi withName(String value) { if (this.name.equals(value)) return this; String newValue = Objects.requireNonNull(value, "name"); return new ImmutableAtoi(this.args, this.returnValue, newValue, this.description); }
/** * Copy the current immutable object by setting a value for the {@link Strcmp#getName() name} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for name * @return A modified copy of the {@code this} object */ public final ImmutableStrcmp withName(String value) { if (this.name.equals(value)) return this; String newValue = Objects.requireNonNull(value, "name"); return new ImmutableStrcmp(this.args, this.returnValue, newValue, this.description); }
/** * Copy the current immutable object by setting a value for the {@link Atoi#getReturnValue() returnValue} attribute. * An equals check used to prevent copying of the same value by returning {@code this}. * @param value A new value for returnValue * @return A modified copy of the {@code this} object */ public final ImmutableAtoi withReturnValue(String value) { if (this.returnValue.equals(value)) return this; String newValue = Objects.requireNonNull(value, "returnValue"); return new ImmutableAtoi(this.args, newValue, this.name, this.description); }