Class WmiUtilFFM
java.lang.Object
oshi.util.platform.windows.WmiUtilFFM
Helper class for WMI using FFM-based WmiResult.
-
Method Summary
Modifier and TypeMethodDescriptiongetDateString(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Date value from a WmiResult as a String in ISO 8601 format.static <T extends Enum<T>>
OffsetDateTimegetDateTime(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a DateTime value from a WmiResult as an OffsetDateTime.static <T extends Enum<T>>
floatgetFloat(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Float value from a WmiResult.getRefString(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Reference value from a WmiResult as a String.static <T extends Enum<T>>
intgetSint32(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Sint32 value from a WmiResult.getString(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a String value from a WmiResult.static <T extends Enum<T>>
intgetUint16(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Uint16 value from a WmiResult.static <T extends Enum<T>>
intgetUint32(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a UINT32 value from a WmiResult.static <T extends Enum<T>>
longgetUint32asLong(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a UINT32 value from a WmiResult as a long, preserving the unsignedness.static <T extends Enum<T>>
longgetUint64(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Uint64 value from a WmiResult (parsing the String).
-
Method Details
-
getString
public static <T extends Enum<T>> String getString(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a String value from a WmiResult.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, an empty-string otherwise
-
getDateString
public static <T extends Enum<T>> String getDateString(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Date value from a WmiResult as a String in ISO 8601 format.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, an empty-string otherwise
-
getDateTime
public static <T extends Enum<T>> OffsetDateTime getDateTime(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a DateTime value from a WmiResult as an OffsetDateTime.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, otherwise
Constants.UNIX_EPOCH
-
getRefString
public static <T extends Enum<T>> String getRefString(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Reference value from a WmiResult as a String.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, an empty-string otherwise
-
getUint64
public static <T extends Enum<T>> long getUint64(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Uint64 value from a WmiResult (parsing the String).- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null and parseable as a long, 0 otherwise
-
getUint32
public static <T extends Enum<T>> int getUint32(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a UINT32 value from a WmiResult.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, 0 otherwise
-
getUint32asLong
public static <T extends Enum<T>> long getUint32asLong(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a UINT32 value from a WmiResult as a long, preserving the unsignedness.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, 0 otherwise
-
getSint32
public static <T extends Enum<T>> int getSint32(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Sint32 value from a WmiResult.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, 0 otherwise
-
getUint16
public static <T extends Enum<T>> int getUint16(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Uint16 value from a WmiResult.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, 0 otherwise
-
getFloat
public static <T extends Enum<T>> float getFloat(WbemcliUtilFFM.WmiResult<T> result, T property, int index) Gets a Float value from a WmiResult.- Type Parameters:
T- the property enum type- Parameters:
result- The WmiResult from which to fetch the valueproperty- The property (column) to fetchindex- The index (row) to fetch- Returns:
- The stored value if non-null, 0 otherwise
-