Record Class X86Info

java.lang.Object
java.lang.Record
cpufeatures.x86.X86Info
Record Components:
features - Which features this processor supports.
family - Family.
model - Model.
stepping - Stepping.
vendor - Manufacturer.
brandString - Brand name.
uarch - Microarchitecture.

public record X86Info(X86Features features, int family, int model, int stepping, String vendor, String brandString, X86Uarch uarch) extends Record
Info on a processor running the X86 architecture.
  • Constructor Details

    • X86Info

      public X86Info(X86Features features, int family, int model, int stepping, String vendor, String brandString, X86Uarch uarch)
      Creates an instance of a X86Info record class.
      Parameters:
      features - the value for the features record component
      family - the value for the family record component
      model - the value for the model record component
      stepping - the value for the stepping record component
      vendor - the value for the vendor record component
      brandString - the value for the brandString record component
      uarch - the value for the uarch record component
  • Method Details

    • get

      public static X86Info get()
      Gets info on the X86 processor running on this JVM.

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

      Returns:
      Processor info.
    • featureSet

      public Set<X86Feature> 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 X86Features features()
      Returns the value of the features record component.
      Returns:
      the value of the features record component
    • family

      public int family()
      Returns the value of the family record component.
      Returns:
      the value of the family record component
    • model

      public int model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • stepping

      public int stepping()
      Returns the value of the stepping record component.
      Returns:
      the value of the stepping record component
    • vendor

      public String vendor()
      Returns the value of the vendor record component.
      Returns:
      the value of the vendor record component
    • brandString

      public String brandString()
      Returns the value of the brandString record component.
      Returns:
      the value of the brandString record component
    • uarch

      public X86Uarch uarch()
      Returns the value of the uarch record component.
      Returns:
      the value of the uarch record component