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

Creation Methods Guide

Creation methods of R

emptyList

Factory function to create instance of R(empty list).

R.emptyList().size().debug(); // 0

emptyMap

Factory function to create instance of R(empty set).

R.emptySet().size().debug(); // 0

emptySet

Factory function to create instance of R(empty set).

R.emptySet().size().debug(); // 0

emptyString

Factory function to create instance of R(empty string).

R.emptyString().size().debug(); // 0

of

Factory function to create instance of R.

R.of('message').size().debug(); // 7

range

Factory function to create instance of R(list of decimals in range).

R.range(1, 3).debug(); // (1, 2)

with

Factory function to create instance of R(List).

R.with(1).size().debug(); // 1
R.with(1, 2).size().debug(); // 2
R.with(1, 2, 3).size().debug(); // 3

withObj

Factory function to create instance of R(Map).

R.withObj('name', 'test').size().debug(); // 1

Contribute on Github! Edit this section.