@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","FileIF"}) @Immutable public final class File extends Object implements FileIF
FileIF.
Use the builder to create immutable instances:
File.builder().
Use the static factory method to create immutable instances:
File.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
File.Builder
Builds instances of type
File. |
| Modifier and Type | Method and Description |
|---|---|
static File.Builder |
builder()
Creates a builder for
File. |
static File |
copyOf(FileIF instance)
Creates an immutable copy of a
FileIF value. |
boolean |
equals(Object another)
This instance is equal to all instances of
File that have equal attribute values. |
Optional<String> |
getBlockId() |
String |
getExternalId() |
String |
getSource() |
String |
getType() |
int |
hashCode()
Computes a hash code from attributes:
type, externalId, source, blockId. |
static File |
of(String externalId,
String source)
Construct a new immutable
File instance. |
String |
toString()
Prints the immutable value
File with attribute values. |
File |
withBlockId(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
blockId attribute. |
File |
withBlockId(String value)
Copy the current immutable object by setting a present value for the optional
blockId attribute. |
File |
withExternalId(String externalId)
Copy the current immutable object by setting a value for the
externalId attribute. |
File |
withSource(String source)
Copy the current immutable object by setting a value for the
source attribute. |
public String getType()
public String getExternalId()
getExternalId in interface FileIFexternalId attributepublic String getSource()
public Optional<String> getBlockId()
getBlockId in interface BlockblockId attributepublic final File withExternalId(String externalId)
externalId attribute.
An equals check used to prevent copying of the same value by returning this.externalId - A new value for externalIdthis objectpublic final File withSource(String source)
source attribute.
An equals check used to prevent copying of the same value by returning this.source - A new value for sourcethis objectpublic final File withBlockId(@Nullable String value)
blockId attribute.value - The value for blockId, null is accepted as java.util.Optional.empty()this objectpublic final File withBlockId(Optional<String> optional)
blockId attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for blockIdthis objectpublic boolean equals(@Nullable Object another)
File that have equal attribute values.public int hashCode()
type, externalId, source, blockId.public String toString()
File with attribute values.public static File of(String externalId, String source)
File instance.externalId - The value for the externalId attributesource - The value for the source attributepublic static File copyOf(FileIF instance)
FileIF 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 File.Builder builder()
File.Copyright © 2019. All rights reserved.