Package oshi.hardware.common
Class AbstractGraphicsCard
- java.lang.Object
-
- oshi.hardware.common.AbstractGraphicsCard
-
- All Implemented Interfaces:
GraphicsCard
- Direct Known Subclasses:
AixGraphicsCard
,FreeBsdGraphicsCard
,LinuxGraphicsCard
,MacGraphicsCard
,OpenBsdGraphicsCard
,SolarisGraphicsCard
,WindowsGraphicsCard
@Immutable public abstract class AbstractGraphicsCard extends java.lang.Object implements GraphicsCard
An abstract Sound Card
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
deviceId
private java.lang.String
name
private java.lang.String
vendor
private java.lang.String
versionInfo
private long
vram
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractGraphicsCard(java.lang.String name, java.lang.String deviceId, java.lang.String vendor, java.lang.String versionInfo, long vram)
Constructor for AbstractGraphicsCard
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDeviceId()
Retrieves the card's Device IDjava.lang.String
getName()
Retrieves the full name of the card.java.lang.String
getVendor()
Retrieves the card's manufacturer/vendorjava.lang.String
getVersionInfo()
Retrieves a list of version/revision data from the card.long
getVRam()
Retrieves the Video RAM (VRAM) available on the GPUjava.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractGraphicsCard
protected AbstractGraphicsCard(java.lang.String name, java.lang.String deviceId, java.lang.String vendor, java.lang.String versionInfo, long vram)
Constructor for AbstractGraphicsCard- Parameters:
name
- The namedeviceId
- The device IDvendor
- The vendorversionInfo
- The version infovram
- The VRAM
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:GraphicsCard
Retrieves the full name of the card.- Specified by:
getName
in interfaceGraphicsCard
- Returns:
- The name of the card.
-
getDeviceId
public java.lang.String getDeviceId()
Description copied from interface:GraphicsCard
Retrieves the card's Device ID- Specified by:
getDeviceId
in interfaceGraphicsCard
- Returns:
- The Device ID of the card
-
getVendor
public java.lang.String getVendor()
Description copied from interface:GraphicsCard
Retrieves the card's manufacturer/vendor- Specified by:
getVendor
in interfaceGraphicsCard
- Returns:
- The vendor of the card as human-readable text if possible, or the Vendor ID (VID) otherwise
-
getVersionInfo
public java.lang.String getVersionInfo()
Description copied from interface:GraphicsCard
Retrieves a list of version/revision data from the card. Users may need to further parse this list to identify specific GPU capabilities.- Specified by:
getVersionInfo
in interfaceGraphicsCard
- Returns:
- A comma-delimited list of version/revision data
-
getVRam
public long getVRam()
Description copied from interface:GraphicsCard
Retrieves the Video RAM (VRAM) available on the GPU- Specified by:
getVRam
in interfaceGraphicsCard
- Returns:
- Total number of bytes.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-