instanceof.Rd
Is a java object an instance of a given java class
o %instanceof% cl
.jinstanceof( o, cl )
TRUE if o is an instance of cl
Double <- J("java.lang.Double")
d <- new( Double, "10.2" )
# character
d %instanceof% "java.lang.Double"
#> [1] TRUE
d %instanceof% "java.lang.Number"
#> [1] TRUE
# jclassName
d %instanceof% Double
#> [1] TRUE
# instance of Class
Double.class <- Double@jobj
d %instanceof% Double.class
#> [1] TRUE
# other object
other.double <- new( Double, 10.2 )
d %instanceof% other.double
#> [1] TRUE