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