Package org.projectnessie.model
Class ImmutableNamespace
- java.lang.Object
-
- org.projectnessie.model.Namespace
-
- org.projectnessie.model.ImmutableNamespace
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableNamespace extends Namespace
Immutable implementation ofNamespace.Use the builder to create immutable instances:
ImmutableNamespace.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableNamespace.BuilderBuilds instances of typeImmutableNamespace.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableNamespace.Builderbuilder()Creates a builder forImmutableNamespace.static ImmutableNamespacecopyOf(Namespace instance)Creates an immutable copy of aNamespacevalue.booleanequals(Object another)This instance is equal to all instances ofImmutableNamespacethat have equal attribute values.inthashCode()Computes a hash code from attributes:name.Stringname()StringtoString()Prints the immutable valueNamespacewith attribute values.ImmutableNamespacewithName(String value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
name
public String name()
-
withName
public final ImmutableNamespace withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableNamespacethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name.
-
toString
public String toString()
Prints the immutable valueNamespacewith attribute values.
-
copyOf
public static ImmutableNamespace copyOf(Namespace instance)
Creates an immutable copy of aNamespacevalue. 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 Namespace instance
-
builder
public static ImmutableNamespace.Builder builder()
Creates a builder forImmutableNamespace.ImmutableNamespace.builder() .name(String) // requiredname.build();- Returns:
- A new ImmutableNamespace builder
-
-