Package com.arakelian.faker.model
Class ImmutableAddress
- java.lang.Object
-
- com.arakelian.faker.model.AbstractModel
-
- com.arakelian.faker.model.Address
-
- com.arakelian.faker.model.ImmutableAddress
-
- All Implemented Interfaces:
com.arakelian.store.feature.HasId,com.arakelian.store.feature.HasTimestamp,java.io.Serializable,java.lang.Comparable<com.arakelian.store.feature.HasId>
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAddress extends AddressImmutable implementation ofAddress.Use the builder to create immutable instances:
ImmutableAddress.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableAddress.BuilderBuilds instances of typeImmutableAddress.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableAddress.Builderbuilder()Creates a builder forImmutableAddress.static ImmutableAddresscopyOf(Address instance)Creates an immutable copy of aAddressvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableAddressthat have equal attribute values.java.lang.StringgetCity()java.time.ZonedDateTimegetCreated()java.lang.StringgetId()java.lang.StringgetPostalCode()java.lang.StringgetState()java.lang.StringgetStreet()java.time.ZonedDateTimegetUpdated()inthashCode()Computes a hash code from attributes:created,id,updated,city,postalCode,state,street.java.lang.StringtoString()Prints the immutable valueAddresswith attribute values.ImmutableAddresswithCity(java.lang.String value)Copy the current immutable object by setting a value for thecityattribute.ImmutableAddresswithCreated(java.time.ZonedDateTime value)Copy the current immutable object by setting a value for thecreatedattribute.ImmutableAddresswithId(java.lang.String value)Copy the current immutable object by setting a value for theidattribute.ImmutableAddresswithPostalCode(java.lang.String value)Copy the current immutable object by setting a value for thepostalCodeattribute.ImmutableAddresswithState(java.lang.String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableAddresswithStreet(java.lang.String value)Copy the current immutable object by setting a value for thestreetattribute.ImmutableAddresswithUpdated(java.time.ZonedDateTime value)Copy the current immutable object by setting a value for theupdatedattribute.-
Methods inherited from class com.arakelian.faker.model.AbstractModel
compareTo
-
-
-
-
Method Detail
-
getCreated
public java.time.ZonedDateTime getCreated()
- Specified by:
getCreatedin interfacecom.arakelian.store.feature.HasTimestamp- Overrides:
getCreatedin classAbstractModel- Returns:
- The value of the
createdattribute
-
getId
public java.lang.String getId()
- Specified by:
getIdin interfacecom.arakelian.store.feature.HasId- Overrides:
getIdin classAbstractModel- Returns:
- The value of the
idattribute
-
getUpdated
public java.time.ZonedDateTime getUpdated()
- Specified by:
getUpdatedin interfacecom.arakelian.store.feature.HasTimestamp- Overrides:
getUpdatedin classAbstractModel- Returns:
- The value of the
updatedattribute
-
getCity
public java.lang.String getCity()
-
getPostalCode
public java.lang.String getPostalCode()
- Specified by:
getPostalCodein classAddress- Returns:
- The value of the
postalCodeattribute
-
getState
public java.lang.String getState()
-
getStreet
public java.lang.String getStreet()
-
withCreated
public final ImmutableAddress withCreated(java.time.ZonedDateTime value)
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- Returns:
- A modified copy of the
thisobject
-
withId
public final ImmutableAddress withId(java.lang.String value)
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withUpdated
public final ImmutableAddress withUpdated(java.time.ZonedDateTime value)
Copy the current immutable object by setting a value for theupdatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for updated- Returns:
- A modified copy of the
thisobject
-
withCity
public final ImmutableAddress withCity(java.lang.String value)
Copy the current immutable object by setting a value for thecityattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for city- Returns:
- A modified copy of the
thisobject
-
withPostalCode
public final ImmutableAddress withPostalCode(java.lang.String value)
Copy the current immutable object by setting a value for thepostalCodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for postalCode- Returns:
- A modified copy of the
thisobject
-
withState
public final ImmutableAddress withState(java.lang.String value)
Copy the current immutable object by setting a value for thestateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state- Returns:
- A modified copy of the
thisobject
-
withStreet
public final ImmutableAddress withStreet(java.lang.String value)
Copy the current immutable object by setting a value for thestreetattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for street- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableAddressthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:created,id,updated,city,postalCode,state,street.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueAddresswith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableAddress copyOf(Address instance)
Creates an immutable copy of aAddressvalue. 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 Address instance
-
builder
public static ImmutableAddress.Builder builder()
Creates a builder forImmutableAddress.ImmutableAddress.builder() .created(java.time.ZonedDateTime) // optionalcreated.id(String) // optionalid.updated(java.time.ZonedDateTime) // optionalupdated.city(String) // requiredcity.postalCode(String) // requiredpostalCode.state(String) // requiredstate.street(String) // requiredstreet.build();- Returns:
- A new ImmutableAddress builder
-
-