Class ImmutableExtendResult
- java.lang.Object
-
- net.rpcnet.securitytoolkit.web.url.ImmutableExtendResult
-
- All Implemented Interfaces:
ExtendResult
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableExtendResult extends Object implements ExtendResult
Immutable implementation ofExtendResult.Use the builder to create immutable instances:
ImmutableExtendResult.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableExtendResult.BuilderBuilds instances of typeImmutableExtendResult.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableExtendResult.Builderbuilder()Creates a builder forImmutableExtendResult.static ImmutableExtendResultcopyOf(ExtendResult instance)Creates an immutable copy of aExtendResultvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableExtendResultthat have equal attribute values.Optional<String>getFinalResult()Collection<String>getIntermediateResults()inthashCode()Computes a hash code from attributes:isSuccessful,finalResult,intermediateResults.booleanisSuccessful()StringtoString()Prints the immutable valueExtendResultwith attribute values.ImmutableExtendResultwithFinalResult(String value)Copy the current immutable object by setting a present value for the optionalfinalResultattribute.ImmutableExtendResultwithFinalResult(Optional<String> optional)Copy the current immutable object by setting an optional value for thefinalResultattribute.ImmutableExtendResultwithIntermediateResults(Collection<String> value)Copy the current immutable object by setting a value for theintermediateResultsattribute.ImmutableExtendResultwithIsSuccessful(boolean value)Copy the current immutable object by setting a value for theisSuccessfulattribute.
-
-
-
Method Detail
-
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessfulin interfaceExtendResult- Returns:
- The value of the
isSuccessfulattribute
-
getFinalResult
public Optional<String> getFinalResult()
- Specified by:
getFinalResultin interfaceExtendResult- Returns:
- The value of the
finalResultattribute
-
getIntermediateResults
public Collection<String> getIntermediateResults()
- Specified by:
getIntermediateResultsin interfaceExtendResult- Returns:
- The value of the
intermediateResultsattribute
-
withIsSuccessful
public final ImmutableExtendResult withIsSuccessful(boolean value)
Copy the current immutable object by setting a value for theisSuccessfulattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for isSuccessful- Returns:
- A modified copy of the
thisobject
-
withFinalResult
public final ImmutableExtendResult withFinalResult(String value)
Copy the current immutable object by setting a present value for the optionalfinalResultattribute.- Parameters:
value- The value for finalResult- Returns:
- A modified copy of
thisobject
-
withFinalResult
public final ImmutableExtendResult withFinalResult(Optional<String> optional)
Copy the current immutable object by setting an optional value for thefinalResultattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for finalResult- Returns:
- A modified copy of
thisobject
-
withIntermediateResults
public final ImmutableExtendResult withIntermediateResults(Collection<String> value)
Copy the current immutable object by setting a value for theintermediateResultsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for intermediateResults- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableExtendResultthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:isSuccessful,finalResult,intermediateResults.
-
toString
public String toString()
Prints the immutable valueExtendResultwith attribute values.
-
copyOf
public static ImmutableExtendResult copyOf(ExtendResult instance)
Creates an immutable copy of aExtendResultvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ExtendResult instance
-
builder
public static ImmutableExtendResult.Builder builder()
Creates a builder forImmutableExtendResult.ImmutableExtendResult.builder() .isSuccessful(boolean) // requiredisSuccessful.finalResult(String) // optionalfinalResult.intermediateResults(Collection<String>) // requiredintermediateResults.build();- Returns:
- A new ImmutableExtendResult builder
-
-