Package oshi.hardware

Class PhysicalMemory


  • @Immutable
    public class PhysicalMemory
    extends java.lang.Object
    The PhysicalMemory class represents a physical memory device located on a computer system and available to the operating system.
    • Constructor Summary

      Constructors 
      Constructor Description
      PhysicalMemory​(java.lang.String bankLabel, long capacity, long clockSpeed, java.lang.String manufacturer, java.lang.String memoryType, java.lang.String partNumber, java.lang.String serialNumber)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getBankLabel()
      The bank and/or slot label.
      long getCapacity()
      The capacity of memory bank in bytes.
      long getClockSpeed()
      The configured memory clock speed in hertz.
      java.lang.String getManufacturer()
      The manufacturer of the physical memory.
      java.lang.String getMemoryType()
      The type of physical memory
      java.lang.String getPartNumber()
      The part number of the physical memory
      java.lang.String getSerialNumber()
      The serial number of the physical memory
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • bankLabel

        private final java.lang.String bankLabel
      • capacity

        private final long capacity
      • clockSpeed

        private final long clockSpeed
      • manufacturer

        private final java.lang.String manufacturer
      • memoryType

        private final java.lang.String memoryType
      • partNumber

        private final java.lang.String partNumber
      • serialNumber

        private final java.lang.String serialNumber
    • Constructor Detail

      • PhysicalMemory

        public PhysicalMemory​(java.lang.String bankLabel,
                              long capacity,
                              long clockSpeed,
                              java.lang.String manufacturer,
                              java.lang.String memoryType,
                              java.lang.String partNumber,
                              java.lang.String serialNumber)
    • Method Detail

      • getBankLabel

        public java.lang.String getBankLabel()
        The bank and/or slot label.
        Returns:
        the bank label
      • getCapacity

        public long getCapacity()
        The capacity of memory bank in bytes.
        Returns:
        the capacity
      • getClockSpeed

        public long getClockSpeed()
        The configured memory clock speed in hertz.

        For DDR memory, this is the data transfer rate, which is a multiple of the actual bus clock speed.

        Returns:
        the clock speed, if avaialable. If unknown, returns -1.
      • getManufacturer

        public java.lang.String getManufacturer()
        The manufacturer of the physical memory.
        Returns:
        the manufacturer
      • getMemoryType

        public java.lang.String getMemoryType()
        The type of physical memory
        Returns:
        the memory type
      • getPartNumber

        public java.lang.String getPartNumber()
        The part number of the physical memory
        Returns:
        the part number
      • getSerialNumber

        public java.lang.String getSerialNumber()
        The serial number of the physical memory
        Returns:
        the serial number
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object