@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","Module"}) @Immutable public final class ImmutableModule extends Object implements Module
Module.
Use builder to create immutable instances:
ImmutableModule.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableModule.Builder
Builds instances of
ImmutableModule. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableModule.Builder |
builder()
Creates builder for
ImmutableModule. |
static ImmutableModule |
copyOf(Module instance)
Creates immutable copy of
Module. |
boolean |
equals(Object another)
This instance is equal to instances of
ImmutableModule with equal attribute values. |
String |
getName() |
com.google.common.collect.ImmutableMap<String,String> |
getOptions() |
String |
getOutput() |
com.google.common.collect.ImmutableList<Proto> |
getProtos() |
int |
hashCode()
Computes hash code from attributes:
name, protos, output, options. |
String |
toString()
Prints immutable value
Module... with attribute values,
excluding any non-generated and auxiliary attributes. |
ImmutableModule |
withName(String value)
Copy current immutable object by setting value for
name. |
ImmutableModule |
withOptions(Map<String,? extends String> entries)
Copy current immutable object by replacing
options map with specified map. |
ImmutableModule |
withOutput(String value)
Copy current immutable object by setting value for
output. |
ImmutableModule |
withProtos(Iterable<? extends Proto> elements)
Copy current immutable object with elements that replace content of
protos. |
ImmutableModule |
withProtos(Proto... elements)
Copy current immutable object with elements that replace content of
protos. |
public String getName()
public com.google.common.collect.ImmutableList<Proto> getProtos()
public String getOutput()
public com.google.common.collect.ImmutableMap<String,String> getOptions()
getOptions in interface Moduleoptions attributepublic final ImmutableModule withName(String value)
name.
Shallow reference equality check is used to prevent copying of the same value by returning this.value - new value for namethis objectpublic final ImmutableModule withProtos(Proto... elements)
protos.elements - elements to setthis objectpublic final ImmutableModule withProtos(Iterable<? extends Proto> elements)
protos.
Shallow reference equality check is used to prevent copying of the same value by returning this.elements - iterable of protos elements to setthis objectpublic final ImmutableModule withOutput(String value)
output.
Shallow reference equality check is used to prevent copying of the same value by returning this.value - new value for outputthis objectpublic final ImmutableModule withOptions(Map<String,? extends String> entries)
options map with specified map.
Nulls are not permitted as keys or values.
Shallow reference equality check is used to prevent copying of the same value by returning this.entries - to be added to options mapthis objectpublic boolean equals(@Nullable Object another)
ImmutableModule with equal attribute values.public int hashCode()
name, protos, output, options.public String toString()
Module... with attribute values,
excluding any non-generated and auxiliary attributes.public static ImmutableModule copyOf(Module instance)
Module.
Uses accessors to get values to initialize immutable instance.
If an instance is already immutable, it is returned as is.instance - instance to copypublic static ImmutableModule.Builder builder()
ImmutableModule.Copyright © 2015–2016. All rights reserved.