Record Class ArmInfo

java.lang.Object
java.lang.Record
cpufeatures.arm.ArmInfo
Record Components:
features - Which features this processor supports.
implementer - Implementer.
architecture - Architecture.
variant - Variant.
part - Part.
revision - Revision.

public record ArmInfo(ArmFeatures features, int implementer, int architecture, int variant, int part, int revision) extends Record
Info on a processor running the ARM architecture.
  • Constructor Details

    • ArmInfo

      public ArmInfo(ArmFeatures features, int implementer, int architecture, int variant, int part, int revision)
      Creates an instance of a ArmInfo record class.
      Parameters:
      features - the value for the features record component
      implementer - the value for the implementer record component
      architecture - the value for the architecture record component
      variant - the value for the variant record component
      part - the value for the part record component
      revision - the value for the revision record component
  • Method Details

    • get

      public static ArmInfo get()
      Gets info on the ARM processor running on this JVM.

      If the host is not on an ARM processor, this operation will fail.

      Returns:
      Processor info.
    • featureSet

      public Set<ArmFeature> featureSet()
      Gets a set of all features that this info holds. If you are testing for a specific feature, prefer using features() instead.
      Returns:
      Set of features.
    • toString

      public final 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
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • features

      public ArmFeatures features()
      Returns the value of the features record component.
      Returns:
      the value of the features record component
    • implementer

      public int implementer()
      Returns the value of the implementer record component.
      Returns:
      the value of the implementer record component
    • architecture

      public int architecture()
      Returns the value of the architecture record component.
      Returns:
      the value of the architecture record component
    • variant

      public int variant()
      Returns the value of the variant record component.
      Returns:
      the value of the variant record component
    • part

      public int part()
      Returns the value of the part record component.
      Returns:
      the value of the part record component
    • revision

      public int revision()
      Returns the value of the revision record component.
      Returns:
      the value of the revision record component