Record Class MOperatingSystemName

java.lang.Object
java.lang.Record
com.io7m.montarre.api.MOperatingSystemName
Record Components:
name - The name
All Implemented Interfaces:
Comparable<MOperatingSystemName>

public record MOperatingSystemName(String name) extends Record implements Comparable<MOperatingSystemName>
An operating system name.
  • Constructor Details

    • MOperatingSystemName

      public MOperatingSystemName(String name)
      An operating system name.
      Parameters:
      name - The name
  • Method Details

    • valid

      public static Pattern valid()
      Returns:
      The pattern that defines validity
    • unknown

      public static MOperatingSystemName unknown()
      Returns:
      The unknown operating system
    • infer

      public static MOperatingSystemName infer(String name)
      Infer an operating system from the given string.
      Parameters:
      name - The name
      Returns:
      The operating system or unknown()
    • zos

      public static MOperatingSystemName zos()
      Returns:
      A standard operating system name
    • windows

      public static MOperatingSystemName windows()
      Returns:
      A standard operating system name
    • solaris

      public static MOperatingSystemName solaris()
      Returns:
      A standard operating system name
    • netbsd

      public static MOperatingSystemName netbsd()
      Returns:
      A standard operating system name
    • openbsd

      public static MOperatingSystemName openbsd()
      Returns:
      A standard operating system name
    • freebsd

      public static MOperatingSystemName freebsd()
      Returns:
      A standard operating system name
    • osx

      public static MOperatingSystemName osx()
      Returns:
      A standard operating system name
    • linux

      public static MOperatingSystemName linux()
      Returns:
      A standard operating system name
    • os400

      public static MOperatingSystemName os400()
      Returns:
      A standard operating system name
    • hpux

      public static MOperatingSystemName hpux()
      Returns:
      A standard operating system name
    • aix

      public static MOperatingSystemName aix()
      Returns:
      A standard operating system name
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • compareTo

      public int compareTo(MOperatingSystemName other)
      Specified by:
      compareTo in interface Comparable<MOperatingSystemName>
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component