Package oshi.hardware

Class HWPartition


  • @Immutable
    public class HWPartition
    extends java.lang.Object
    A region on a hard disk or other secondary storage, so that an operating system can manage information in each region separately. A partition appears in the operating system as a distinct "logical" disk that uses part of the actual disk.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String identification  
      private int major  
      private int minor  
      private java.lang.String mountPoint  
      private java.lang.String name  
      private long size  
      private java.lang.String type  
      private java.lang.String uuid  
    • Constructor Summary

      Constructors 
      Constructor Description
      HWPartition​(java.lang.String identification, java.lang.String name, java.lang.String type, java.lang.String uuid, long size, int major, int minor, java.lang.String mountPoint)
      Creates a new HWPartition
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getIdentification()
      Getter for the field identification.
      int getMajor()
      Getter for the field major.
      int getMinor()
      Getter for the field minor.
      java.lang.String getMountPoint()
      Getter for the field mountPoint.
      java.lang.String getName()
      Getter for the field name.
      long getSize()
      Getter for the field size.
      java.lang.String getType()
      Getter for the field type.
      java.lang.String getUuid()
      Getter for the field uuid.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • identification

        private final java.lang.String identification
      • name

        private final java.lang.String name
      • type

        private final java.lang.String type
      • uuid

        private final java.lang.String uuid
      • size

        private final long size
      • major

        private final int major
      • minor

        private final int minor
      • mountPoint

        private final java.lang.String mountPoint
    • Constructor Detail

      • HWPartition

        public HWPartition​(java.lang.String identification,
                           java.lang.String name,
                           java.lang.String type,
                           java.lang.String uuid,
                           long size,
                           int major,
                           int minor,
                           java.lang.String mountPoint)
        Creates a new HWPartition
        Parameters:
        identification - The unique partition id
        name - Friendly name of the partition
        type - Type or description of the partition
        uuid - UUID
        size - Size in bytes
        major - Device ID (Major)
        minor - Device ID (Minor)
        mountPoint - Where the partition is mounted
    • Method Detail

      • getIdentification

        public java.lang.String getIdentification()

        Getter for the field identification.

        Returns:
        Returns the identification.
      • getName

        public java.lang.String getName()

        Getter for the field name.

        Returns:
        Returns the name.
      • getType

        public java.lang.String getType()

        Getter for the field type.

        Returns:
        Returns the type.
      • getUuid

        public java.lang.String getUuid()

        Getter for the field uuid.

        Returns:
        Returns the uuid.
      • getSize

        public long getSize()

        Getter for the field size.

        Returns:
        Returns the size in bytes.
      • getMajor

        public int getMajor()

        Getter for the field major.

        Returns:
        Returns the major device ID.
      • getMinor

        public int getMinor()

        Getter for the field minor.

        Returns:
        Returns the minor device ID.
      • getMountPoint

        public java.lang.String getMountPoint()

        Getter for the field mountPoint.

        Returns:
        Returns the mount point.
      • toString

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