C# Class clojure.lang.StreamSeq

Implements a persistent sequence over a stream.
Caches the stream values as retrieved.
Inheritance: clojure.lang.ASeq
Afficher le fichier Open project: arohner/clojure-contrib

Méthodes publiques

Méthode Description
create ( IStream stream ) : StreamSeq

Create a sequence from a stream.

Requires looking at the first element of the stream. This is so that we know if the stream has any elements. This is so because the sequence must have at least element or be null.

first ( ) : object

Gets the first item.

rest ( ) : ISeq

Gets the rest of the sequence.

withMeta ( IPersistentMap meta ) : IObj

Create a copy with new metadata.

Private Methods

Méthode Description
StreamSeq ( IPersistentMap meta, Object first, ISeq rest ) : System

Construct a StreamSeq from metadata and first/rest.

StreamSeq ( object first, IStream stream ) : System

Construct a StreamSeq from a first item and a stream.

Method Details

create() public static méthode

Create a sequence from a stream.
Requires looking at the first element of the stream. This is so that we know if the stream has any elements. This is so because the sequence must have at least element or be null.
public static create ( IStream stream ) : StreamSeq
stream IStream The stream to sequence.
Résultat StreamSeq

first() public méthode

Gets the first item.
public first ( ) : object
Résultat object

rest() public méthode

Gets the rest of the sequence.
public rest ( ) : ISeq
Résultat ISeq

withMeta() public méthode

Create a copy with new metadata.
public withMeta ( IPersistentMap meta ) : IObj
meta IPersistentMap The new metadata.
Résultat IObj