Package com.io7m.brooklime.api
Class BLApplicationVersion
- java.lang.Object
-
- com.io7m.brooklime.api.BLApplicationVersion
-
- All Implemented Interfaces:
BLApplicationVersionType
public final class BLApplicationVersion extends java.lang.Object implements BLApplicationVersionType
An application version.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBLApplicationVersion.BuilderBuilds instances of typeBLApplicationVersion.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringapplicationName()java.lang.StringapplicationVersion()static BLApplicationVersion.Builderbuilder()Creates a builder forBLApplicationVersion.static BLApplicationVersioncopyOf(BLApplicationVersionType instance)Creates an immutable copy of aBLApplicationVersionTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofBLApplicationVersionthat have equal attribute values.inthashCode()Computes a hash code from attributes:applicationName,applicationVersion.java.lang.StringtoString()Prints the immutable valueBLApplicationVersionwith attribute values.BLApplicationVersionwithApplicationName(java.lang.String value)Copy the current immutable object by setting a value for theapplicationNameattribute.BLApplicationVersionwithApplicationVersion(java.lang.String value)Copy the current immutable object by setting a value for theapplicationVersionattribute.
-
-
-
Method Detail
-
applicationName
public java.lang.String applicationName()
- Specified by:
applicationNamein interfaceBLApplicationVersionType- Returns:
- The name of the application
-
applicationVersion
public java.lang.String applicationVersion()
- Specified by:
applicationVersionin interfaceBLApplicationVersionType- Returns:
- The version of the application
-
withApplicationName
public final BLApplicationVersion withApplicationName(java.lang.String value)
Copy the current immutable object by setting a value for theapplicationNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for applicationName- Returns:
- A modified copy of the
thisobject
-
withApplicationVersion
public final BLApplicationVersion withApplicationVersion(java.lang.String value)
Copy the current immutable object by setting a value for theapplicationVersionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for applicationVersion- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)
This instance is equal to all instances ofBLApplicationVersionthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:applicationName,applicationVersion.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueBLApplicationVersionwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static BLApplicationVersion copyOf(BLApplicationVersionType instance)
Creates an immutable copy of aBLApplicationVersionTypevalue. 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 BLApplicationVersion instance
-
builder
public static BLApplicationVersion.Builder builder()
Creates a builder forBLApplicationVersion.BLApplicationVersion.builder() .setApplicationName(String) // requiredapplicationName.setApplicationVersion(String) // requiredapplicationVersion.build();- Returns:
- A new BLApplicationVersion builder
-
-