Containers

Scalqa features a unified value container framework, which includes traditional collections and other value holding objects like: stream, property, option, etc.

All containers are designed with a single vision, have consistent naming, are interoperable and (in most cases) specializable for primitives.

Value Container Framework

Top level collections include:

  • Collection is the framework root trait
  • Idx is an integer indexed collection of values (trait)
    • Pack is an immutable Idx implementation (class)
    • Buffer is growable Idx implementation (class)
  • Lookup is a key accessible collection of values (trait)
  • Set is a collection of unique values (class)

Top level non-collections include:

  • Stream - stream of values interface
  • Range - abstract range of values
  • Pro - value provider (holds a single value)
  • Opt - value option (holds value or is empty)
  • Result - value result (holds value or problem)
  • Promise - future calculated value