Package io.github.ai4ci.abm
Class ImmutableExposure
java.lang.Object
io.github.ai4ci.abm.ImmutableExposure
- All Implemented Interfaces:
Exposure
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableExposure
extends Object
implements Exposure
Immutable implementation of
Exposure
.
Use the builder to create immutable instances:
ImmutableExposure.builder()
.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableExposure.Builder
builder()
Creates a builder forImmutableExposure
.static ImmutableExposure
Creates an immutable copy of aExposure
value.boolean
This instance is equal to all instances ofImmutableExposure
that have equal attribute values.int
double
int
hashCode()
Computes a hash code from attributes:exposure
,exposerId
.Creates a builder forImmutableExposure
.prefilled with attibute values ofthis
instance to easily create modified copies.toString()
Prints the immutable valueExposure
with attribute values.final ImmutableExposure
withExposerId
(int value) Copy the current immutable object by setting a value for theexposerId
attribute.final ImmutableExposure
withExposure
(double value) Copy the current immutable object by setting a value for theexposure
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.github.ai4ci.abm.Exposure
getExposer
-
Method Details
-
getExposure
public double getExposure()- Specified by:
getExposure
in interfaceExposure
- Returns:
- The value of the
exposure
attribute
-
getExposerId
public int getExposerId()- Specified by:
getExposerId
in interfaceExposure
- Returns:
- The value of the
exposerId
attribute
-
withExposure
Copy the current immutable object by setting a value for theexposure
attribute. A value strict bits equality used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for exposure- Returns:
- A modified copy of the
this
object
-
withExposerId
Copy the current immutable object by setting a value for theexposerId
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for exposerId- Returns:
- A modified copy of the
this
object
-
equals
This instance is equal to all instances ofImmutableExposure
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:exposure
,exposerId
. -
toString
Prints the immutable valueExposure
with attribute values. -
copyOf
Creates an immutable copy of aExposure
value. 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 Exposure instance
-
toBuilder
Creates a builder forImmutableExposure
.prefilled with attibute values ofthis
instance to easily create modified copies.- Returns:
- A new ImmutableExposure builder with attributes of
this
instance
-
builder
Creates a builder forImmutableExposure
.ImmutableExposure.builder() .setExposure(double) // required
exposure
.setExposerId(int) // requiredexposerId
.build();- Returns:
- A new ImmutableExposure builder
-