Package oshi.hardware
Class HWPartition
java.lang.Object
oshi.hardware.HWPartition
- All Implemented Interfaces:
java.lang.Comparable<HWPartition>
public class HWPartition extends java.lang.Object implements java.lang.Comparable<HWPartition>
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.
-
Constructor Summary
Constructors Constructor Description HWPartition()Creates a new HWPartitionHWPartition(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
Modifier and Type Method Description intcompareTo(HWPartition part)booleanequals(java.lang.Object obj)java.lang.StringgetIdentification()Getter for the fieldidentification.intgetMajor()Getter for the fieldmajor.intgetMinor()Getter for the fieldminor.java.lang.StringgetMountPoint()Getter for the fieldmountPoint.java.lang.StringgetName()Getter for the fieldname.longgetSize()Getter for the fieldsize.java.lang.StringgetType()Getter for the fieldtype.java.lang.StringgetUuid()Getter for the fielduuid.inthashCode()voidsetIdentification(java.lang.String identification)Setter for the fieldidentification.voidsetMajor(int major)Setter for the fieldmajor.voidsetMinor(int minor)Setter for the fieldminor.voidsetMountPoint(java.lang.String mountPoint)Setter for the fieldmountPoint.voidsetName(java.lang.String name)Setter for the fieldname.voidsetSize(long size)Setter for the fieldsize.voidsetType(java.lang.String type)Setter for the fieldtype.voidsetUuid(java.lang.String uuid)Setter for the fielduuid.java.lang.StringtoString()
-
Constructor Details
-
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 idname- Friendly name of the partitiontype- Type or description of the partitionuuid- UUIDsize- Size in bytesmajor- Device ID (Major)minor- Device ID (Minor)mountPoint- Where the partition is mounted
-
HWPartition
public HWPartition()Creates a new HWPartition
-
-
Method Details
-
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.
-
setIdentification
public void setIdentification(java.lang.String identification)Setter for the field
identification.- Parameters:
identification- The identification to set.
-
setName
public void setName(java.lang.String name)Setter for the field
name.- Parameters:
name- The name to set.
-
setType
public void setType(java.lang.String type)Setter for the field
type.- Parameters:
type- The type to set.
-
setUuid
public void setUuid(java.lang.String uuid)Setter for the field
uuid.- Parameters:
uuid- The uuid to set.
-
setSize
public void setSize(long size)Setter for the field
size.- Parameters:
size- The size (in bytes) to set.
-
setMajor
public void setMajor(int major)Setter for the field
major.- Parameters:
major- The major device ID to set.
-
setMinor
public void setMinor(int minor)Setter for the field
minor.- Parameters:
minor- The minor device ID to set.
-
setMountPoint
public void setMountPoint(java.lang.String mountPoint)Setter for the field
mountPoint.- Parameters:
mountPoint- Mount point of the partition
-
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<HWPartition>
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-