java.lang.Object
io.github.eggy03.dmidecode.entity.processor.AbstractDMICache
io.github.eggy03.dmidecode.entity.processor.DMICache

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

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

Instances of this class are thread-safe.

Usage example


 DMICache cache = new DMICache.Builder()
     .socketDesignation("L3-Cache")
     .location("Internal")
     .installedSize("32 MB")
     .associativity("16-way Set-Associative")
     .build();
 // Create a modified copy
 DMICache updated = cache
     .withInstalledSize("64 MB");
 
Since:
0.2.0
  • Field Details

    • socketDesignation

      private final @Nullable String socketDesignation
    • configuration

      private final @Nullable String configuration
    • operationalMode

      private final @Nullable String operationalMode
    • location

      private final @Nullable String location
    • installedSize

      private final @Nullable String installedSize
    • maximumSize

      private final @Nullable String maximumSize
    • supportedSramTypes

      private final @Nullable List<String> supportedSramTypes
    • installedSramType

      private final @Nullable String installedSramType
    • speed

      private final @Nullable String speed
    • errorCorrectionType

      private final @Nullable String errorCorrectionType
    • systemType

      private final @Nullable String systemType
    • associativity

      private final @Nullable String associativity
  • Constructor Details

    • DMICache

      private DMICache(@Nullable String socketDesignation, @Nullable String configuration, @Nullable String operationalMode, @Nullable String location, @Nullable String installedSize, @Nullable String maximumSize, @Nullable List<String> supportedSramTypes, @Nullable String installedSramType, @Nullable String speed, @Nullable String errorCorrectionType, @Nullable String systemType, @Nullable String associativity)
  • Method Details

    • socketDesignation

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

      public @Nullable String configuration()
      Specified by:
      configuration in class AbstractDMICache
      Returns:
      The value of the configuration attribute
    • operationalMode

      public @Nullable String operationalMode()
      Specified by:
      operationalMode in class AbstractDMICache
      Returns:
      The value of the operationalMode attribute
    • location

      public @Nullable String location()
      Specified by:
      location in class AbstractDMICache
      Returns:
      The value of the location attribute
    • installedSize

      public @Nullable String installedSize()
      Specified by:
      installedSize in class AbstractDMICache
      Returns:
      The value of the installedSize attribute
    • maximumSize

      public @Nullable String maximumSize()
      Specified by:
      maximumSize in class AbstractDMICache
      Returns:
      The value of the maximumSize attribute
    • supportedSramTypes

      public @Nullable List<String> supportedSramTypes()
      Specified by:
      supportedSramTypes in class AbstractDMICache
      Returns:
      The value of the supportedSramTypes attribute
    • installedSramType

      public @Nullable String installedSramType()
      Specified by:
      installedSramType in class AbstractDMICache
      Returns:
      The value of the installedSramType attribute
    • speed

      public @Nullable String speed()
      Specified by:
      speed in class AbstractDMICache
      Returns:
      The value of the speed attribute
    • errorCorrectionType

      public @Nullable String errorCorrectionType()
      Specified by:
      errorCorrectionType in class AbstractDMICache
      Returns:
      The value of the errorCorrectionType attribute
    • systemType

      public @Nullable String systemType()
      Specified by:
      systemType in class AbstractDMICache
      Returns:
      The value of the systemType attribute
    • associativity

      public @Nullable String associativity()
      Specified by:
      associativity in class AbstractDMICache
      Returns:
      The value of the associativity attribute
    • withSocketDesignation

      public final DMICache 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
    • withConfiguration

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

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

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

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

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

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

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

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

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

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

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

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

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

      private boolean equalsByValue(DMICache another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: socketDesignation, configuration, operationalMode, location, installedSize, maximumSize, supportedSramTypes, installedSramType, speed, errorCorrectionType, systemType, associativity.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • fromJson

      @Deprecated static DMICache fromJson(DMICache.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 DMICache copyOf(AbstractDMICache instance)
      Creates an immutable copy of a AbstractDMICache 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 DMICache 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)