@Generated(value="org.immutables.processor.ProxyProcessor") public final class ImmutableMapTypeInfo<K,V> extends MapTypeInfo<K,V>
MapTypeInfo.
Use the builder to create immutable instances:
ImmutableMapTypeInfo.builder().
Use the static factory method to create immutable instances:
ImmutableMapTypeInfo.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableMapTypeInfo.Builder<K,V>
Builds instances of type
ImmutableMapTypeInfo. |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> ImmutableMapTypeInfo.Builder<K,V> |
builder()
Creates a builder for
ImmutableMapTypeInfo. |
static <K,V> ImmutableMapTypeInfo<K,V> |
copyOf(MapTypeInfo<K,V> instance)
Creates an immutable copy of a
MapTypeInfo value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableMapTypeInfo that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
key, value. |
TypeInfo<K> |
key() |
static <K,V> ImmutableMapTypeInfo<K,V> |
of(TypeInfo<K> key,
TypeInfo<V> value)
Construct a new immutable
MapTypeInfo instance. |
String |
toString()
Prints the immutable value
MapTypeInfo with attribute values. |
TypeInfo<V> |
value() |
ImmutableMapTypeInfo<K,V> |
withKey(TypeInfo<K> value)
Copy the current immutable object by setting a value for the
key attribute. |
ImmutableMapTypeInfo<K,V> |
withValue(TypeInfo<V> value)
Copy the current immutable object by setting a value for the
value attribute. |
cast, isInstanceclone, finalize, getClass, notify, notifyAll, wait, wait, waitifInstance, listOf, mapOf, ofpublic TypeInfo<K> key()
key in class MapTypeInfo<K,V>key attributepublic TypeInfo<V> value()
value in class MapTypeInfo<K,V>value attributepublic final ImmutableMapTypeInfo<K,V> withKey(TypeInfo<K> value)
key attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for keythis objectpublic final ImmutableMapTypeInfo<K,V> withValue(TypeInfo<V> value)
value attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for valuethis objectpublic boolean equals(Object another)
ImmutableMapTypeInfo that have equal attribute values.public int hashCode()
key, value.public String toString()
MapTypeInfo with attribute values.public static <K,V> ImmutableMapTypeInfo<K,V> of(TypeInfo<K> key, TypeInfo<V> value)
MapTypeInfo instance.K - generic parameter KV - generic parameter Vkey - The value for the key attributevalue - The value for the value attributepublic static <K,V> ImmutableMapTypeInfo<K,V> copyOf(MapTypeInfo<K,V> instance)
MapTypeInfo value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.K - generic parameter KV - generic parameter Vinstance - The instance to copypublic static <K,V> ImmutableMapTypeInfo.Builder<K,V> builder()
ImmutableMapTypeInfo.
ImmutableMapTypeInfo.<K, V>builder()
.key(de.flapdoodle.reflection.TypeInfo<K>) // required key
.value(de.flapdoodle.reflection.TypeInfo<V>) // required value
.build();
K - generic parameter KV - generic parameter VCopyright © 2023. All rights reserved.