Class DMIPhysicalMemoryArray

java.lang.Object
io.github.eggy03.dmidecode.entity.memory.AbstractDMIPhysicalMemoryArray
io.github.eggy03.dmidecode.entity.memory.DMIPhysicalMemoryArray

@Generated(from="AbstractDMIPhysicalMemoryArray", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class DMIPhysicalMemoryArray extends AbstractDMIPhysicalMemoryArray
Immutable representation of physical memory array information retrieved via DMI.

Fields correspond to properties reported by dmidecode for the Physical Memory Array (Type 16) SMBIOS structure.

Instances of this class are thread-safe.

Usage example


 DMIPhysicalMemoryArray array = new DMIPhysicalMemoryArray.Builder()
     .location("System Board Or Motherboard")
     .use("System Memory")
     .maximumCapacity("128 GB")
     .numberOfDevices(4)
     .build();
 // Create a modified copy
 DMIPhysicalMemoryArray updated = array
     .withErrorCorrectionType("Multi-bit ECC");
 
Since:
0.2.0
  • Field Details

    • location

      private final @Nullable String location
    • use

      private final @Nullable String use
    • errorCorrectionType

      private final @Nullable String errorCorrectionType
    • maximumCapacity

      private final @Nullable String maximumCapacity
    • errorInformationHandle

      private final @Nullable String errorInformationHandle
    • numberOfDevices

      private final @Nullable Integer numberOfDevices
  • Constructor Details

    • DMIPhysicalMemoryArray

      private DMIPhysicalMemoryArray(@Nullable String location, @Nullable String use, @Nullable String errorCorrectionType, @Nullable String maximumCapacity, @Nullable String errorInformationHandle, @Nullable Integer numberOfDevices)
  • Method Details

    • location

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

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

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

      public @Nullable String maximumCapacity()
      Specified by:
      maximumCapacity in class AbstractDMIPhysicalMemoryArray
      Returns:
      The value of the maximumCapacity attribute
    • errorInformationHandle

      public @Nullable String errorInformationHandle()
      Specified by:
      errorInformationHandle in class AbstractDMIPhysicalMemoryArray
      Returns:
      The value of the errorInformationHandle attribute
    • numberOfDevices

      public @Nullable Integer numberOfDevices()
      Specified by:
      numberOfDevices in class AbstractDMIPhysicalMemoryArray
      Returns:
      The value of the numberOfDevices attribute
    • withLocation

      public final DMIPhysicalMemoryArray 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
    • withUse

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

      public final DMIPhysicalMemoryArray 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
    • withMaximumCapacity

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

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

      public final DMIPhysicalMemoryArray withNumberOfDevices(@Nullable Integer value)
      Copy the current immutable object by setting a value for the numberOfDevices attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for numberOfDevices (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 DMIPhysicalMemoryArray that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • equalsByValue

      private boolean equalsByValue(DMIPhysicalMemoryArray another)
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: location, use, errorCorrectionType, maximumCapacity, errorInformationHandle, numberOfDevices.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • fromJson

      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 DMIPhysicalMemoryArray copyOf(AbstractDMIPhysicalMemoryArray instance)
      Creates an immutable copy of a AbstractDMIPhysicalMemoryArray 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 DMIPhysicalMemoryArray instance