I have an object called Node<Value>
. Objects NodeInternal<Value>
and NodeLeaf<Value>
inherit from Node<Value>
.
I am trying to test what is the type of the object using instanceof
as follows:
if (node instanceof NodeInternal)
. I did not add <Value>
because upon runtime, the type is dropped. Without <Value>
on NodeInternal
however, I get the following warning: NodeInternal is a raw type. References to generic type NodeInternal<Value> should be parameterized
.
What should I do in this case?