Class DMIProcessor

java.lang.Object
io.github.eggy03.dmidecode.entity.processor.AbstractDMIProcessor
io.github.eggy03.dmidecode.entity.processor.DMIProcessor

@Generated(from="AbstractDMIProcessor", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class DMIProcessor extends AbstractDMIProcessor
Immutable representation of processor information retrieved via DMI.

Fields correspond to properties reported by dmidecode for the Processor Information (Type 4) SMBIOS structure.

Instances of this class are thread-safe.

Usage example


 DMIProcessor processor = new DMIProcessor.Builder()
     .socketDesignation("CPU0")
     .manufacturer("Intel")
     .version("Intel(R) Core(TM) i7-12700H")
     .coreCount(14)
     .threadCount(20)
     .currentSpeed("2700 MHz")
     .build();
 // Create a modified copy
 DMIProcessor updated = processor
     .withCurrentSpeed("3900 MHz");
 
Since:
0.2.0
  • Field Details

    • socketDesignation

      private final @Nullable String socketDesignation
    • type

      private final @Nullable String type
    • family

      private final @Nullable String family
    • manufacturer

      private final @Nullable String manufacturer
    • id

      private final @Nullable String id
    • signature

      private final @Nullable String signature
    • flags

      private final @Nullable List<String> flags
    • version

      private final @Nullable String version
    • voltage

      private final @Nullable String voltage
    • externalClock

      private final @Nullable String externalClock
    • maxSpeed

      private final @Nullable String maxSpeed
    • currentSpeed

      private final @Nullable String currentSpeed
    • status

      private final @Nullable String status
    • upgrade

      private final @Nullable String upgrade
    • l1CacheHandle

      private final @Nullable String l1CacheHandle
    • l2CacheHandle

      private final @Nullable String l2CacheHandle
    • l3CacheHandle

      private final @Nullable String l3CacheHandle
    • serialNumber

      private final @Nullable String serialNumber
    • assetTag

      private final @Nullable String assetTag
    • partNumber

      private final @Nullable String partNumber
    • coreCount

      private final @Nullable Integer coreCount
    • coreEnabled

      private final @Nullable Integer coreEnabled
    • threadCount

      private final @Nullable Integer threadCount
    • characteristics

      private final @Nullable List<String> characteristics
  • Constructor Details

  • Method Details

    • socketDesignation

      public @Nullable String socketDesignation()
      Specified by:
      socketDesignation in class AbstractDMIProcessor
      Returns:
      The value of the socketDesignation attribute
    • type

      public @Nullable String type()
      Specified by:
      type in class AbstractDMIProcessor
      Returns:
      The value of the type attribute
    • family

      public @Nullable String family()
      Specified by:
      family in class AbstractDMIProcessor
      Returns:
      The value of the family attribute
    • manufacturer

      public @Nullable String manufacturer()
      Specified by:
      manufacturer in class AbstractDMIProcessor
      Returns:
      The value of the manufacturer attribute
    • id

      public @Nullable String id()
      Specified by:
      id in class AbstractDMIProcessor
      Returns:
      The value of the id attribute
    • signature

      public @Nullable String signature()
      Specified by:
      signature in class AbstractDMIProcessor
      Returns:
      The value of the signature attribute
    • flags

      public @Nullable List<String> flags()
      Specified by:
      flags in class AbstractDMIProcessor
      Returns:
      The value of the flags attribute
    • version

      public @Nullable String version()
      Specified by:
      version in class AbstractDMIProcessor
      Returns:
      The value of the version attribute
    • voltage

      public @Nullable String voltage()
      Specified by:
      voltage in class AbstractDMIProcessor
      Returns:
      The value of the voltage attribute
    • externalClock

      public @Nullable String externalClock()
      Specified by:
      externalClock in class AbstractDMIProcessor
      Returns:
      The value of the externalClock attribute
    • maxSpeed

      public @Nullable String maxSpeed()
      Specified by:
      maxSpeed in class AbstractDMIProcessor
      Returns:
      The value of the maxSpeed attribute
    • currentSpeed

      public @Nullable String currentSpeed()
      Specified by:
      currentSpeed in class AbstractDMIProcessor
      Returns:
      The value of the currentSpeed attribute
    • status

      public @Nullable String status()
      Specified by:
      status in class AbstractDMIProcessor
      Returns:
      The value of the status attribute
    • upgrade

      public @Nullable String upgrade()
      Specified by:
      upgrade in class AbstractDMIProcessor
      Returns:
      The value of the upgrade attribute
    • l1CacheHandle

      public @Nullable String l1CacheHandle()
      Specified by:
      l1CacheHandle in class AbstractDMIProcessor
      Returns:
      The value of the l1CacheHandle attribute
    • l2CacheHandle

      public @Nullable String l2CacheHandle()
      Specified by:
      l2CacheHandle in class AbstractDMIProcessor
      Returns:
      The value of the l2CacheHandle attribute
    • l3CacheHandle

      public @Nullable String l3CacheHandle()
      Specified by:
      l3CacheHandle in class AbstractDMIProcessor
      Returns:
      The value of the l3CacheHandle attribute
    • serialNumber

      public @Nullable String serialNumber()
      Specified by:
      serialNumber in class AbstractDMIProcessor
      Returns:
      The value of the serialNumber attribute
    • assetTag

      public @Nullable String assetTag()
      Specified by:
      assetTag in class AbstractDMIProcessor
      Returns:
      The value of the assetTag attribute
    • partNumber

      public @Nullable String partNumber()
      Specified by:
      partNumber in class AbstractDMIProcessor
      Returns:
      The value of the partNumber attribute
    • coreCount

      public @Nullable Integer coreCount()
      Specified by:
      coreCount in class AbstractDMIProcessor
      Returns:
      The value of the coreCount attribute
    • coreEnabled

      public @Nullable Integer coreEnabled()
      Specified by:
      coreEnabled in class AbstractDMIProcessor
      Returns:
      The value of the coreEnabled attribute
    • threadCount

      public @Nullable Integer threadCount()
      Specified by:
      threadCount in class AbstractDMIProcessor
      Returns:
      The value of the threadCount attribute
    • characteristics

      public @Nullable List<String> characteristics()
      Specified by:
      characteristics in class AbstractDMIProcessor
      Returns:
      The value of the characteristics attribute
    • withSocketDesignation

      public final DMIProcessor withSocketDesignation(@Nullable String value)
      Copy the current immutable object by setting a value for the socketDesignation attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for socketDesignation (can be null)
      Returns:
      A modified copy or the this object
    • withType

      public final DMIProcessor withType(@Nullable String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type (can be null)
      Returns:
      A modified copy or the this object
    • withFamily

      public final DMIProcessor withFamily(@Nullable String value)
      Copy the current immutable object by setting a value for the family attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for family (can be null)
      Returns:
      A modified copy or the this object
    • withManufacturer

      public final DMIProcessor withManufacturer(@Nullable String value)
      Copy the current immutable object by setting a value for the manufacturer attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for manufacturer (can be null)
      Returns:
      A modified copy or the this object
    • withId

      public final DMIProcessor withId(@Nullable String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id (can be null)
      Returns:
      A modified copy or the this object
    • withSignature

      public final DMIProcessor withSignature(@Nullable String value)
      Copy the current immutable object by setting a value for the signature attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for signature (can be null)
      Returns:
      A modified copy or the this object
    • withFlags

      public final DMIProcessor withFlags(@Nullable String @Nullable ... elements)
      Copy the current immutable object with elements that replace the content of flags.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withFlags

      public final DMIProcessor withFlags(@Nullable Iterable<@Nullable String> elements)
      Copy the current immutable object with elements that replace the content of flags. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of flags elements to set
      Returns:
      A modified copy or this if not changed
    • withVersion

      public final DMIProcessor withVersion(@Nullable String value)
      Copy the current immutable object by setting a value for the version attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for version (can be null)
      Returns:
      A modified copy or the this object
    • withVoltage

      public final DMIProcessor withVoltage(@Nullable String value)
      Copy the current immutable object by setting a value for the voltage attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for voltage (can be null)
      Returns:
      A modified copy or the this object
    • withExternalClock

      public final DMIProcessor withExternalClock(@Nullable String value)
      Copy the current immutable object by setting a value for the externalClock attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for externalClock (can be null)
      Returns:
      A modified copy or the this object
    • withMaxSpeed

      public final DMIProcessor withMaxSpeed(@Nullable String value)
      Copy the current immutable object by setting a value for the maxSpeed attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for maxSpeed (can be null)
      Returns:
      A modified copy or the this object
    • withCurrentSpeed

      public final DMIProcessor withCurrentSpeed(@Nullable String value)
      Copy the current immutable object by setting a value for the currentSpeed attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for currentSpeed (can be null)
      Returns:
      A modified copy or the this object
    • withStatus

      public final DMIProcessor withStatus(@Nullable String value)
      Copy the current immutable object by setting a value for the status attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for status (can be null)
      Returns:
      A modified copy or the this object
    • withUpgrade

      public final DMIProcessor withUpgrade(@Nullable String value)
      Copy the current immutable object by setting a value for the upgrade attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for upgrade (can be null)
      Returns:
      A modified copy or the this object
    • withL1CacheHandle

      public final DMIProcessor withL1CacheHandle(@Nullable String value)
      Copy the current immutable object by setting a value for the l1CacheHandle attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for l1CacheHandle (can be null)
      Returns:
      A modified copy or the this object
    • withL2CacheHandle

      public final DMIProcessor withL2CacheHandle(@Nullable String value)
      Copy the current immutable object by setting a value for the l2CacheHandle attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for l2CacheHandle (can be null)
      Returns:
      A modified copy or the this object
    • withL3CacheHandle

      public final DMIProcessor withL3CacheHandle(@Nullable String value)
      Copy the current immutable object by setting a value for the l3CacheHandle attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for l3CacheHandle (can be null)
      Returns:
      A modified copy or the this object
    • withSerialNumber

      public final DMIProcessor withSerialNumber(@Nullable String value)
      Copy the current immutable object by setting a value for the serialNumber attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for serialNumber (can be null)
      Returns:
      A modified copy or the this object
    • withAssetTag

      public final DMIProcessor withAssetTag(@Nullable String value)
      Copy the current immutable object by setting a value for the assetTag attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for assetTag (can be null)
      Returns:
      A modified copy or the this object
    • withPartNumber

      public final DMIProcessor withPartNumber(@Nullable String value)
      Copy the current immutable object by setting a value for the partNumber attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for partNumber (can be null)
      Returns:
      A modified copy or the this object
    • withCoreCount

      public final DMIProcessor withCoreCount(@Nullable Integer value)
      Copy the current immutable object by setting a value for the coreCount attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for coreCount (can be null)
      Returns:
      A modified copy or the this object
    • withCoreEnabled

      public final DMIProcessor withCoreEnabled(@Nullable Integer value)
      Copy the current immutable object by setting a value for the coreEnabled attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for coreEnabled (can be null)
      Returns:
      A modified copy or the this object
    • withThreadCount

      public final DMIProcessor withThreadCount(@Nullable Integer value)
      Copy the current immutable object by setting a value for the threadCount attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for threadCount (can be null)
      Returns:
      A modified copy or the this object
    • withCharacteristics

      public final DMIProcessor withCharacteristics(@Nullable String @Nullable ... elements)
      Copy the current immutable object with elements that replace the content of characteristics.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCharacteristics

      public final DMIProcessor withCharacteristics(@Nullable Iterable<@Nullable String> elements)
      Copy the current immutable object with elements that replace the content of characteristics. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of characteristics elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of DMIProcessor that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalsByValue

      private boolean equalsByValue(DMIProcessor another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: socketDesignation, type, family, manufacturer, id, signature, flags, version, voltage, externalClock, maxSpeed, currentSpeed, status, upgrade, l1CacheHandle, l2CacheHandle, l3CacheHandle, serialNumber, assetTag, partNumber, coreCount, coreEnabled, threadCount, characteristics.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • fromJson

      @Deprecated static DMIProcessor fromJson(DMIProcessor.Json json)
      Deprecated.
      Do not use this method directly, it exists only for the Jackson-binding infrastructure
      Parameters:
      json - A JSON-bindable data structure
      Returns:
      An immutable value type
    • copyOf

      public static DMIProcessor copyOf(AbstractDMIProcessor instance)
      Creates an immutable copy of a AbstractDMIProcessor value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable DMIProcessor instance
    • createSafeList

      private static <T> List<T> createSafeList(Iterable<? extends T> iterable, boolean checkNulls, boolean skipNulls)
    • createUnmodifiableList

      private static <T> List<T> createUnmodifiableList(boolean clone, List<? extends T> list)