Package hydra.packaging
Class LifecycleInfo
- java.lang.Object
-
- hydra.packaging.LifecycleInfo
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<LifecycleInfo>
public class LifecycleInfo extends java.lang.Object implements java.io.Serializable, java.lang.Comparable<LifecycleInfo>
Version-lifecycle milestones for a packaging entity. Each milestone is independently optional; further milestones (e.g. stableSince, removedSince) may be added without changing dependent types.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLifecycleInfo.BuilderA fluent builder forLifecycleInfo.
-
Field Summary
Fields Modifier and Type Field Description static NameAVAILABLE_SINCEName of thehydra.packaging.LifecycleInfo.availableSincefield.Optional<Version>availableSinceThe version in which the entity was introduced, if known.static NameDEPRECATED_SINCEName of thehydra.packaging.LifecycleInfo.deprecatedSincefield.Optional<Version>deprecatedSinceThe version in which the entity was deprecated, if applicable.static NameTYPE_Name of thehydra.packaging.LifecycleInfotype.
-
Constructor Summary
Constructors Constructor Description LifecycleInfo(Optional<Version> availableSince, Optional<Version> deprecatedSince)Constructs an immutableLifecycleInfo.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LifecycleInfo.Builderbuilder()Creates a new fluent builder forLifecycleInfo.intcompareTo(LifecycleInfo other)booleanequals(java.lang.Object other)inthashCode()java.lang.StringtoString()LifecycleInfowithAvailableSince(Optional<Version> availableSince)Returns a copy of thisLifecycleInfowithavailableSincereplaced.LifecycleInfowithDeprecatedSince(Optional<Version> deprecatedSince)Returns a copy of thisLifecycleInfowithdeprecatedSincereplaced.
-
-
-
Field Detail
-
TYPE_
public static final Name TYPE_
Name of thehydra.packaging.LifecycleInfotype.
-
AVAILABLE_SINCE
public static final Name AVAILABLE_SINCE
Name of thehydra.packaging.LifecycleInfo.availableSincefield.
-
DEPRECATED_SINCE
public static final Name DEPRECATED_SINCE
Name of thehydra.packaging.LifecycleInfo.deprecatedSincefield.
-
availableSince
public final Optional<Version> availableSince
The version in which the entity was introduced, if known.
-
-
Constructor Detail
-
LifecycleInfo
public LifecycleInfo(Optional<Version> availableSince, Optional<Version> deprecatedSince)
Constructs an immutableLifecycleInfo.- Parameters:
availableSince- The version in which the entity was introduced, if known.deprecatedSince- The version in which the entity was deprecated, if applicable.
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
compareTo
public int compareTo(LifecycleInfo other)
- Specified by:
compareToin interfacejava.lang.Comparable<LifecycleInfo>
-
withAvailableSince
public LifecycleInfo withAvailableSince(Optional<Version> availableSince)
Returns a copy of thisLifecycleInfowithavailableSincereplaced.
-
withDeprecatedSince
public LifecycleInfo withDeprecatedSince(Optional<Version> deprecatedSince)
Returns a copy of thisLifecycleInfowithdeprecatedSincereplaced.
-
builder
public static LifecycleInfo.Builder builder()
Creates a new fluent builder forLifecycleInfo.
-
-