R.apex

  • Docs
  • Tutorials
Docs Menu
  • Func
  • R.Funcs
    • Conversion Funcs
    • Arithmetic Funcs
    • Logic Funcs
    • Relation Funcs
    • Function Funcs
    • Comparator Funcs
    • Condition Funcs
    • List Funcs
    • String Funcs
    • Map Funcs
    • Utility Funcs
    • Database Funcs
  • R.Instance
    • Creation Methods
    • Conversion Methods
    • Methods

Utility Funcs Guide

Utility Funcs in R

F

A function that always returns false.

R.F.run()
// false

T

A function that always returns true.

R.T.run()
// true

compact

Remove any null value from the elements.

R.compact.run(R.with(1, null, 2))
// (1, 2)

debug

Print the debug log.

R.debug.run(1)
// 1

defaultTo

Default to a value.

R.defaultTo.run(5, null)
// 5

doClone

Get the clone.

R.doClone.run(new Account())
// Account:{}

isNil

Check if it is null.

R.isNil.run(null)
// true

isNotNil

Check if it is not null.

R.isNotNil.run(null)
// false

isNotNull

Same as isNotNil.

isNull

Same as isNil.

isNumber

Check if it is number.

R.isNumber.run(1)
// true

noop

No op function.

R.noop.run()
// null

assert

Do System assert

R.assert.run(1 == 1, 'should equal');

assertEquals

Do System assertEquals

R.assertEquals.run(1, 1, 'should equal');

assertNotEquals

Do System assertNotEquals

R.assertNotEquals.run(1, 2, 'should not equal');

Contribute on Github! Edit this section.