Class ImmutableScope
java.lang.Object
io.dialob.session.engine.session.model.ImmutableScope
- All Implemented Interfaces:
Scope,Serializable
@Generated(from="Scope",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableScope
extends Object
implements Scope
Immutable implementation of
Scope.
Use the builder to create immutable instances:
ImmutableScope.builder().
Use the static factory method to create immutable instances:
ImmutableScope.of().
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableScope.Builderbuilder()Creates a builder forImmutableScope.static ImmutableScopeCreates an immutable copy of aScopevalue.booleanThis instance is equal to all instances ofImmutableScopethat have equal attribute values.com.google.common.collect.ImmutableSet<ItemId> inthashCode()Computes a hash code from attributes:scopeId,scopeItems.static ImmutableScopeConstruct a new immutableScopeinstance.static ImmutableScopeConstruct a new immutableScopeinstance.toString()Prints the immutable valueScopewith attribute values.final ImmutableScopewithScopeId(ItemId value) Copy the current immutable object by setting a value for thescopeIdattribute.final ImmutableScopewithScopeItems(ItemId... elements) Copy the current immutable object with elements that replace the content ofscopeItems.final ImmutableScopewithScopeItems(Iterable<? extends ItemId> elements) Copy the current immutable object with elements that replace the content ofscopeItems.
-
Method Details
-
getScopeId
- Specified by:
getScopeIdin interfaceScope- Returns:
- The value of the
scopeIdattribute
-
getScopeItems
- Specified by:
getScopeItemsin interfaceScope- Returns:
- The value of the
scopeItemsattribute
-
withScopeId
Copy the current immutable object by setting a value for thescopeIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scopeId- Returns:
- A modified copy or the
thisobject
-
withScopeItems
Copy the current immutable object with elements that replace the content ofscopeItems.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withScopeItems
Copy the current immutable object with elements that replace the content ofscopeItems. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of scopeItems elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableScopethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:scopeId,scopeItems. -
toString
Prints the immutable valueScopewith attribute values. -
of
Construct a new immutableScopeinstance.- Parameters:
scopeId- The value for thescopeIdattributescopeItems- The value for thescopeItemsattribute- Returns:
- An immutable Scope instance
-
of
Construct a new immutableScopeinstance.- Parameters:
scopeId- The value for thescopeIdattributescopeItems- The value for thescopeItemsattribute- Returns:
- An immutable Scope instance
-
copyOf
Creates an immutable copy of aScopevalue. 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 Scope instance
-
builder
Creates a builder forImmutableScope.ImmutableScope.builder() .scopeId(io.dialob.session.engine.session.model.ItemId) // requiredscopeId.addScopeItems|addAllScopeItems(io.dialob.session.engine.session.model.ItemId) //scopeItemselements .build();- Returns:
- A new ImmutableScope builder
-