Package com.glitchybyte.glib
Class GObjects
java.lang.Object
com.glitchybyte.glib.GObjects
Object utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TcastOrNull(Object obj, Class<T> tClass) Tests ifobjis of typetClassand returns the same object of that type.
-
Method Details
-
castOrNull
Tests ifobjis of typetClassand returns the same object of that type. If it's not of the type, it returns null.- Type Parameters:
T- Type of returned object.- Parameters:
obj- Object to test and return.tClass- Class we want the object to be.- Returns:
objcast astClassor null.
-