mtkValue-class: The 'mtkValue' class

Description Class Hierarchy Constructor Slots Methods Author(s) Examples

Description

The mtkValue class is a virtual class used to manage a triple (name, type, value).

Class Hierarchy

Parent classes :
Direct Known Subclasses :

mtkParameter, codemtkFeature

Constructor

mtkValue

signature(name='unknown', type=”, val=NULL)

Slots

name:

(character) the name of the variable.

type:

(character) the type of the variable.

val:

(ANY) the value of the variable in the right type. It may be a single value or a vector of values

Methods

getName

signature( this = "mtkValue"): Returns the value of the slot "name".

getValue

signature( this = "mtkValue"): Returns the value of the slot "val".

getType

signature(this = "mtkValue"): Returns the value of the slot "type".

setName

signature(this = "mtkValue", name = "character"): Gives a new value to the slot "name".

setValue

signature(this = "mtkValue", type = "ANY"): Gives a new value to the slot "val".

setType

signature(this = "mtkValue", type = "character"): Gives a new value to the slot "type".

show

signature( object = "mtkValue"): Prints a report of the data managed by the underlying object.

print

signature(x = "mtkValue"): Prints the information managed by the underlying object.

Author(s)

Juhui WANG, MIA-jouy, INRA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Create a  new object of 'mtkValue'
d <- mtkValue("a", "double", c(0,1))
getType(d) # gives "double"
getName(d) # gives "a"
getValue(d) # gives (0, 1)

setType(d, 'character')
getValue(d) # gives ("0", "1")

setValue(d, "3.14")
getValue(d) # gives "3.14"

mtk documentation built on May 2, 2019, 4:15 a.m.