Package com.io7m.montarre.api
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MOperatingSystemNameaix()intcompareTo(MOperatingSystemName other) final booleanIndicates whether some other object is "equal to" this one.static MOperatingSystemNamefreebsd()final inthashCode()Returns a hash code value for this object.static MOperatingSystemNamehpux()static MOperatingSystemNameInfer an operating system from the given string.static MOperatingSystemNamelinux()name()Returns the value of thenamerecord component.static MOperatingSystemNamenetbsd()static MOperatingSystemNameopenbsd()static MOperatingSystemNameos400()static MOperatingSystemNameosx()static MOperatingSystemNamesolaris()toString()Returns a string representation of this record class.static MOperatingSystemNameunknown()static Patternvalid()static MOperatingSystemNamewindows()static MOperatingSystemNamezos()
-
Constructor Details
-
MOperatingSystemName
An operating system name.- Parameters:
name- The name
-
-
Method Details
-
valid
- Returns:
- The pattern that defines validity
-
unknown
- Returns:
- The unknown operating system
-
infer
Infer an operating system from the given string.- Parameters:
name- The name- Returns:
- The operating system or
unknown()
-
zos
- Returns:
- A standard operating system name
-
windows
- Returns:
- A standard operating system name
-
solaris
- Returns:
- A standard operating system name
-
netbsd
- Returns:
- A standard operating system name
-
openbsd
- Returns:
- A standard operating system name
-
freebsd
- Returns:
- A standard operating system name
-
osx
- Returns:
- A standard operating system name
-
linux
- Returns:
- A standard operating system name
-
os400
- Returns:
- A standard operating system name
-
hpux
- Returns:
- A standard operating system name
-
aix
- Returns:
- A standard operating system name
-
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. -
compareTo
- Specified by:
compareToin interfaceComparable<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. -
equals
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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-