Learn R Programming

J4R (version 1.0.8)

setJavaField: Set the value of a public field

Description

This function sets a particular field, which can be either static or not. If the field is static, the source should be a valid class name.

Usage

setJavaField(source, fieldName, value, affinity = 1)

Arguments

source

this should be either a java.list instance or a single java.object instance for non-static methods or a string representing the Java class name in case of static method

fieldName

the name of the field to be set

value

the new value of the field

affinity

a parameter used by the mclapply.j4r function in case of multithreading.

Details

When the source is a java.object instance, this function can be substituted for the $ operator.