Package com.telenordigital.nbiot
Class ImmutableDataSearchParameters.Builder
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableDataSearchParameters.Builder
-
- Enclosing class:
- ImmutableDataSearchParameters
@NotThreadSafe public static final class ImmutableDataSearchParameters.Builder extends Object
Builds instances of typeImmutableDataSearchParameters. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates a builder forImmutableDataSearchParametersinstances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableDataSearchParametersbuild()Builds a newImmutableDataSearchParameters.ImmutableDataSearchParameters.Builderfrom(DataSearchParameters instance)Fill a builder with attribute values from the providedDataSearchParametersinstance.ImmutableDataSearchParameters.Builderlimit(Integer limit)Initializes the value for thelimitattribute.ImmutableDataSearchParameters.Buildersince(Instant since)Initializes the value for thesinceattribute.ImmutableDataSearchParameters.Builderuntil(Instant until)Initializes the value for theuntilattribute.
-
-
-
Constructor Detail
-
Builder
public Builder()
Creates a builder forImmutableDataSearchParametersinstances.new ImmutableDataSearchParameters.Builder() .limit(Integer | null) // nullablelimit.since(java.time.Instant | null) // nullablesince.until(java.time.Instant | null) // nullableuntil.build();
-
-
Method Detail
-
from
public final ImmutableDataSearchParameters.Builder from(DataSearchParameters instance)
Fill a builder with attribute values from the providedDataSearchParametersinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
limit
public final ImmutableDataSearchParameters.Builder limit(@Nullable Integer limit)
Initializes the value for thelimitattribute.- Parameters:
limit- The value for limit (can benull)- Returns:
thisbuilder for use in a chained invocation
-
since
public final ImmutableDataSearchParameters.Builder since(@Nullable Instant since)
Initializes the value for thesinceattribute.- Parameters:
since- The value for since (can benull)- Returns:
thisbuilder for use in a chained invocation
-
until
public final ImmutableDataSearchParameters.Builder until(@Nullable Instant until)
Initializes the value for theuntilattribute.- Parameters:
until- The value for until (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableDataSearchParameters build()
Builds a newImmutableDataSearchParameters.- Returns:
- An immutable instance of DataSearchParameters
- Throws:
IllegalStateException- if any required attributes are missing
-
-