java.lang.Object
java.lang.Record
eu.hansolo.toolbox.Helper.OperatingSystemInfo
- Enclosing class:
- Helper
-
Constructor Summary
ConstructorsConstructorDescriptionOperatingSystemInfo(String arc, int availableProcessors, String operatingSystemName, String operatingSystemVersion, double systemLoadAverage) Creates an instance of aOperatingSystemInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionarc()Returns the value of thearcrecord component.intReturns the value of theavailableProcessorsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoperatingSystemNamerecord component.Returns the value of theoperatingSystemVersionrecord component.doubleReturns the value of thesystemLoadAveragerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OperatingSystemInfo
public OperatingSystemInfo(String arc, int availableProcessors, String operatingSystemName, String operatingSystemVersion, double systemLoadAverage) Creates an instance of aOperatingSystemInforecord class.- Parameters:
arc- the value for thearcrecord componentavailableProcessors- the value for theavailableProcessorsrecord componentoperatingSystemName- the value for theoperatingSystemNamerecord componentoperatingSystemVersion- the value for theoperatingSystemVersionrecord componentsystemLoadAverage- the value for thesystemLoadAveragerecord component
-
-
Method Details
-
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
arc
Returns the value of thearcrecord component.- Returns:
- the value of the
arcrecord component
-
availableProcessors
public int availableProcessors()Returns the value of theavailableProcessorsrecord component.- Returns:
- the value of the
availableProcessorsrecord component
-
operatingSystemName
Returns the value of theoperatingSystemNamerecord component.- Returns:
- the value of the
operatingSystemNamerecord component
-
operatingSystemVersion
Returns the value of theoperatingSystemVersionrecord component.- Returns:
- the value of the
operatingSystemVersionrecord component
-
systemLoadAverage
public double systemLoadAverage()Returns the value of thesystemLoadAveragerecord component.- Returns:
- the value of the
systemLoadAveragerecord component
-