Description Usage Arguments Value Author(s) Examples
Is a java object an instance of a given java class
1 2 | o %instanceof% cl
.jinstanceof( o, cl )
|
o |
java object reference |
cl |
java class. This can be a character vector of length one
giving the name of the class, or another java object, or an instance
of the Class class, or a object of class |
TRUE if o is an instance of cl
Romain Francois <francoisromain@free.fr>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Double <- J("java.lang.Double")
d <- new( Double, "10.2" )
# character
d %instanceof% "java.lang.Double"
d %instanceof% "java.lang.Number"
# jclassName
d %instanceof% Double
# instance of Class
Double.class <- Double@jobj
d %instanceof% Double.class
# other object
other.double <- new( Double, 10.2 )
d %instanceof% other.double
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.