Package com.telenordigital.nbiot
Class ImmutableInvite
- java.lang.Object
-
- com.telenordigital.nbiot.ImmutableInvite
-
- All Implemented Interfaces:
Invite
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableInvite extends Object implements Invite
Immutable implementation ofInvite.Use the builder to create immutable instances:
new ImmutableInvite.Builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableInvite.BuilderBuilds instances of typeImmutableInvite.-
Nested classes/interfaces inherited from interface com.telenordigital.nbiot.Invite
Invite.InviteList
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcode()The invite code.static ImmutableInvitecopyOf(Invite instance)Creates an immutable copy of aInvitevalue.longcreatedAt()The creation time, in milliseconds since Unix epoch.booleanequals(Object another)This instance is equal to all instances ofImmutableInvitethat have equal attribute values.inthashCode()Computes a hash code from attributes:code,createdAt.StringtoString()Prints the immutable valueInvitewith attribute values.ImmutableInvitewithCode(String value)Copy the current immutable object by setting a value for thecodeattribute.ImmutableInvitewithCreatedAt(long value)Copy the current immutable object by setting a value for thecreatedAtattribute.
-
-
-
Method Detail
-
createdAt
public long createdAt()
The creation time, in milliseconds since Unix epoch.
-
withCode
public final ImmutableInvite withCode(@Nullable String value)
Copy the current immutable object by setting a value for thecodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for code (can benull)- Returns:
- A modified copy of the
thisobject
-
withCreatedAt
public final ImmutableInvite withCreatedAt(long value)
Copy the current immutable object by setting a value for thecreatedAtattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createdAt- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableInvitethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:code,createdAt.
-
toString
public String toString()
Prints the immutable valueInvitewith attribute values.
-
copyOf
public static ImmutableInvite copyOf(Invite instance)
Creates an immutable copy of aInvitevalue. 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 Invite instance
-
-