Skip to content

Standard Library

The Vertex standard library is small on purpose. Most of its surface area is built around the core types you already meet in the Language Tour: primitives, Option, Result, and collections. This section documents the supporting types that are also available globally.

Built-in numeric primitives (Int, Long, Double, Decimal) each carry a small set of methods on their instance (conversion, arithmetic helpers, parsing from String). See Numeric methods.

UseType
Whole numbers, 32-bit rangeInt
Whole numbers, 64-bit rangeLong
Fractional, IEEE-754Double
Fractional, precise (money)Decimal

String values carry the usual assortment of query and transform methods (length, toUpperCase, contains, split, trim, …). See String methods.

There are three date-related types, each with a different job:

UseType
A calendar date (no time-of-day)Date
A specific moment, including time-of-dayDateTime
Formatting a Date or DateTime to a StringDateFormat

See Date, DateTime, and DateFormat.

Full documentation for List<T>, Map<K, V>, and Set<T> lives in the main reference under Collections. They are not repeated here.

Option<T> and Result<T, E> are the core types for absence and failure. See Option and Result.

  • Methods are camelCase. toUpperCase, unwrapOr, filterMapSome.
  • Methods that might not produce a value return Option. List.first(), List.get(i), Map.get(k), String.indexOf(...).
  • Methods that might fail return Result. Parsing, construction with validation.
  • Pure by default. Collection methods return new values; they do not mutate the receiver. The mutable keyword is reserved for reassignment, not for hidden in-place mutation.
  • No overloading. One name, one signature. If you see a second form, it is a different method with a different name.
  • No I/O beyond debug. Reading files, network calls, and environment variables are Apex-runtime concerns; use extern declarations to call the appropriate Apex APIs.
  • No threading primitives. Apex’s execution model is synchronous within a transaction; Vertex reflects that.
  • No random. If you need randomness, go through System.Crypto or similar via Apex FFI.