testbox.system.modules.cbstreams.models

Class StreamBuilder

lucee.Component
    extended by testbox.system.modules.cbstreams.models.StreamBuilder

This is a static factory class to build CFML Streams

Class Attributes:
  • singleton
  •  
  • synchronized : false
  •  
  • accessors : false
  •  
  • persistent : false
  •  
    Constructor Summary
    init()
          Constructor.
    Method Summary
    Builder builder()
         Returns a builder for a Stream.
    Stream new([any collection=''], [any isNumeric='false'], [any predicate=''])
         Construct a stream from an incoming collection.
     
    Methods inherited from class lucee.Component
    None

    Constructor Detail

    init

    public init()

    Constructor


    Method Detail

    builder

    public Builder builder()

    Returns a builder for a Stream.


    new

    public Stream new([any collection=''], [any isNumeric='false'], [any predicate=''])

    Construct a stream from an incoming collection. The supported types are: structs, arrays, lists, and strings. You can also strong type the stream according to the predicate argument. This is useful when doing mathematical operations on the stream.

    Parameters:
    collection - This is an optional collection to build a stream on: List, Array, Struct, Query
    isNumeric - This is a shorthand for doing a numeric typed array of values. This will choose a long stream for you by default.
    predicate - If you will be doing operations on the stream, you can mark it with a predicate type of: int, long or double. Else we will use generic object streams