Class MEARuntimeSearch

java.lang.Object
com.io7m.montarre.adoptium.MEARuntimeSearch
All Implemented Interfaces:
MEARuntimeSearchType

public final class MEARuntimeSearch extends Object implements MEARuntimeSearchType
Runtime search parameters.
  • Method Details

    • featureVersion

      public int featureVersion()
      Specified by:
      featureVersion in interface MEARuntimeSearchType
      Returns:
      The Java feature version (such as "21")
    • architecture

      public MArchitectureName architecture()
      Specified by:
      architecture in interface MEARuntimeSearchType
      Returns:
      The architecture name
    • operatingSystem

      public MOperatingSystemName operatingSystem()
      Specified by:
      operatingSystem in interface MEARuntimeSearchType
      Returns:
      The operating system name
    • imageKind

      public MRuntimeImageKind imageKind()
      Specified by:
      imageKind in interface MEARuntimeSearchType
      Returns:
      The image kind
    • withFeatureVersion

      public final MEARuntimeSearch withFeatureVersion(int value)
      Copy the current immutable object by setting a value for the featureVersion attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for featureVersion
      Returns:
      A modified copy or the this object
    • withArchitecture

      public final MEARuntimeSearch withArchitecture(MArchitectureName value)
      Copy the current immutable object by setting a value for the architecture attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for architecture
      Returns:
      A modified copy or the this object
    • withOperatingSystem

      public final MEARuntimeSearch withOperatingSystem(MOperatingSystemName value)
      Copy the current immutable object by setting a value for the operatingSystem attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for operatingSystem
      Returns:
      A modified copy or the this object
    • withImageKind

      public final MEARuntimeSearch withImageKind(MRuntimeImageKind value)
      Copy the current immutable object by setting a value for the imageKind attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for imageKind
      Returns:
      A modified copy or the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of MEARuntimeSearch that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: featureVersion, architecture, operatingSystem, imageKind.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value MEARuntimeSearch with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static MEARuntimeSearch copyOf(MEARuntimeSearchType instance)
      Creates an immutable copy of a MEARuntimeSearchType value. 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 MEARuntimeSearch instance
    • builder

      public static MEARuntimeSearch.Builder builder()
      Creates a builder for MEARuntimeSearch.
      MEARuntimeSearch.builder()
         .setFeatureVersion(int) // required featureVersion
         .setArchitecture(com.io7m.montarre.api.MArchitectureName) // required architecture
         .setOperatingSystem(com.io7m.montarre.api.MOperatingSystemName) // required operatingSystem
         .setImageKind(com.io7m.montarre.api.MRuntimeImageKind) // optional imageKind
         .build();
      
      Returns:
      A new MEARuntimeSearch builder