Class VersionProperty

java.lang.Object
io.spring.initializr.generator.version.VersionProperty
All Implemented Interfaces:
Serializable, Comparable<VersionProperty>

public final class VersionProperty extends Object implements Serializable, Comparable<VersionProperty>
Represents a valid property for a version. A property must be lower case and can define a dot or an hyphen to separate words. For instance, "foo-acme.version", "foo.acme.version" or "foo-acme-version" are valid properties.
Author:
Stephane Nicoll
See Also:
  • Method Details

    • of

      public static VersionProperty of(String property, boolean internal)
      Create a VersionProperty.
      Parameters:
      property - the name of the property
      internal - whether the property is internal and can be tuned according to the build system
      Returns:
      a version property
    • of

      public static VersionProperty of(String property)
      Create an internal VersionProperty.
      Parameters:
      property - the name of the property
      Returns:
      a version property whose format can be tuned according to the build system
    • isInternal

      public boolean isInternal()
      Specify if the property is internally defined and can be tuned according to the build system.
      Returns:
      true if the property is defined within the scope of this project
    • toCamelCaseFormat

      public String toCamelCaseFormat()
      Return a camel cased representation of this instance.
      Returns:
      the property in camel case format
    • toStandardFormat

      public String toStandardFormat()
    • compareTo

      public int compareTo(VersionProperty o)
      Specified by:
      compareTo in interface Comparable<VersionProperty>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object