Package org.jinq.orm.stream
Class QueryJinqStream<T>
- java.lang.Object
-
- org.jinq.orm.stream.LazyWrappedStream<T>
-
- org.jinq.orm.stream.NonQueryJinqStream<T>
-
- org.jinq.orm.stream.QueryJinqStream<T>
-
- All Implemented Interfaces:
java.lang.AutoCloseable,java.util.stream.BaseStream<T,java.util.stream.Stream<T>>,java.util.stream.Stream<T>,JinqStream<T>
public class QueryJinqStream<T> extends NonQueryJinqStream<T> implements JinqStream<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jinq.orm.stream.NonQueryJinqStream
NonQueryJinqStream.IteratorTee<T>
-
Nested classes/interfaces inherited from interface org.jinq.orm.stream.JinqStream
JinqStream.AggregateGroup<W,U,V>, JinqStream.AggregateSelect<U,V>, JinqStream.CollectBigDecimal<U>, JinqStream.CollectBigInteger<U>, JinqStream.CollectComparable<U,V extends java.lang.Comparable<V>>, JinqStream.CollectDouble<U>, JinqStream.CollectInteger<U>, JinqStream.CollectLong<U>, JinqStream.CollectNumber<U,V extends java.lang.Number & java.lang.Comparable<V>>, JinqStream.Join<U,V>, JinqStream.JoinToIterable<U,V>, JinqStream.JoinWithSource<U,V>, JinqStream.Select<U,V>, JinqStream.SelectWithSource<U,V>, JinqStream.Where<U,E extends java.lang.Exception>, JinqStream.WhereForOn<U,V>, JinqStream.WhereWithSource<U,E extends java.lang.Exception>
-
-
Field Summary
-
Fields inherited from class org.jinq.orm.stream.NonQueryJinqStream
inQueryStreamSource, recordedExceptions
-
-
Constructor Summary
Constructors Constructor Description QueryJinqStream(QueryComposer<T> query)QueryJinqStream(QueryComposer<T> query, InQueryStreamSource inQueryStreamSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V extends java.lang.Number & java.lang.Comparable<V>>
java.lang.Doubleavg(JinqStream.CollectNumber<T,V> aggregate)Finds the average of the elements of a stream.longcount()Counts the elements in the stream.protected java.util.stream.Stream<T>createWrappedStream()<U> JinqStream<Pair<T,U>>crossJoin(JinqStream<U> join)Performs a full cross-join of the elements of two streams.JinqStream<T>distinct()java.lang.StringgetDebugQueryString()Returns the query that Jinq will send to the database to generate the values of the stream.protected <U,W extends Tuple>
JinqStream<W>groupToTuple(JinqStream.Select<T,U> select, JinqStream.AggregateGroup<U,T,?>[] aggregates)<U> JinqStream<Pair<T,U>>join(JinqStream.Join<T,U> join)Pairs up each entry of the stream with a stream of related elements.<U> JinqStream<Pair<T,U>>join(JinqStream.JoinWithSource<T,U> join)Pairs up each entry of the stream with a stream of related elements.<U> JinqStream<Pair<T,U>>joinList(JinqStream.JoinToIterable<T,U> join)A variant of join() that can be used if you want to join to a collection without the trouble of converting it to a JinqStream first.<U> JinqStream<Pair<T,U>>leftOuterJoin(JinqStream.Join<T,U> join)Pairs up each entry of the stream with a stream of related elements.<U> JinqStream<Pair<T,U>>leftOuterJoin(JinqStream.JoinWithSource<T,U> join, JinqStream.WhereForOn<T,U> on)Pairs up each entry of the stream with a stream of related elements.<U> JinqStream<Pair<T,U>>leftOuterJoinList(JinqStream.JoinToIterable<T,U> join)A variant of leftOuterJoin() that can be used if you want to join to a collection without the trouble of converting it to a JinqStream first.JinqStream<T>limit(long n)protected <U> JinqStream<U>makeQueryStream(QueryComposer<U> query, InQueryStreamSource inQueryStreamSource)<V extends java.lang.Comparable<V>>
Vmax(JinqStream.CollectComparable<T,V> aggregate)Finds the largest or maximum element of a stream.<V extends java.lang.Comparable<V>>
Vmin(JinqStream.CollectComparable<T,V> aggregate)Finds the smallest or minimum element of a stream.<U> JinqStream<U>select(JinqStream.Select<T,U> select)Transforms the elements in the stream.<U> JinqStream<U>select(JinqStream.SelectWithSource<T,U> select)Transforms the elements in the stream.<U> JinqStream<U>selectAll(JinqStream.Join<T,U> select)Transforms the elements in the stream.<U> JinqStream<U>selectAll(JinqStream.JoinWithSource<T,U> select)Transforms the elements in the stream.<U> JinqStream<U>selectAllList(JinqStream.JoinToIterable<T,U> select)A variant of selectAll() that can be used if you want to join to a collection without the trouble of converting it to a JinqStream first.JinqStream<T>setHint(java.lang.String name, java.lang.Object value)Sets a hint on the stream for how the query should be executedJinqStream<T>skip(long n)<V extends java.lang.Comparable<V>>
JinqStream<T>sortedBy(JinqStream.CollectComparable<T,V> sorter)Sorts the elements of a stream in ascending order based on the value returned.<V extends java.lang.Comparable<V>>
JinqStream<T>sortedDescendingBy(JinqStream.CollectComparable<T,V> sorter)Sorts the elements of a stream in descending order based on the value returned.java.math.BigDecimalsumBigDecimal(JinqStream.CollectBigDecimal<T> aggregate)java.math.BigIntegersumBigInteger(JinqStream.CollectBigInteger<T> aggregate)java.lang.DoublesumDouble(JinqStream.CollectDouble<T> aggregate)java.lang.LongsumInteger(JinqStream.CollectInteger<T> aggregate)Calculates a sum over the elements of a stream.java.lang.LongsumLong(JinqStream.CollectLong<T> aggregate)<E extends java.lang.Exception>
JinqStream<T>where(JinqStream.Where<T,E> test)Filters the elements of the stream.<E extends java.lang.Exception>
JinqStream<T>where(JinqStream.WhereWithSource<T,E> test)Filters the elements of the stream.-
Methods inherited from class org.jinq.orm.stream.NonQueryJinqStream
aggregate, aggregate, aggregate, aggregate, findFirst, findOne, getExceptions, getOnlyValue, group, group, group, group, group, group, group, propagateException, toList, wrap
-
Methods inherited from class org.jinq.orm.stream.LazyWrappedStream
allMatch, anyMatch, close, collect, collect, filter, findAny, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, isParallel, iterator, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, onClose, parallel, peek, realizeStream, reduce, reduce, reduce, sequential, sorted, sorted, spliterator, toArray, toArray, unordered
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.stream.BaseStream
close, isParallel, iterator, onClose, parallel, sequential, spliterator, unordered
-
Methods inherited from interface org.jinq.orm.stream.JinqStream
aggregate, aggregate, aggregate, aggregate, exists, findFirst, findOne, getExceptions, getOnlyValue, group, group, group, group, group, group, group, propagateException, toList
-
Methods inherited from interface java.util.stream.Stream
allMatch, anyMatch, collect, collect, dropWhile, filter, findAny, flatMap, flatMapToDouble, flatMapToInt, flatMapToLong, forEach, forEachOrdered, map, mapToDouble, mapToInt, mapToLong, max, min, noneMatch, peek, reduce, reduce, reduce, sorted, sorted, takeWhile, toArray, toArray
-
-
-
-
Constructor Detail
-
QueryJinqStream
public QueryJinqStream(QueryComposer<T> query)
-
QueryJinqStream
public QueryJinqStream(QueryComposer<T> query, InQueryStreamSource inQueryStreamSource)
-
-
Method Detail
-
makeQueryStream
protected <U> JinqStream<U> makeQueryStream(QueryComposer<U> query, InQueryStreamSource inQueryStreamSource)
-
createWrappedStream
protected java.util.stream.Stream<T> createWrappedStream()
- Overrides:
createWrappedStreamin classLazyWrappedStream<T>
-
where
public <E extends java.lang.Exception> JinqStream<T> where(JinqStream.Where<T,E> test)
Description copied from interface:JinqStreamFilters the elements of the stream.JinqStream<Customer> stream = ...; JinqStream<Customer> result = stream.where(c -> c.getName().equals("Alice"));- Specified by:
wherein interfaceJinqStream<T>- Overrides:
wherein classNonQueryJinqStream<T>- Parameters:
test- function applied to the elements of the stream. When passed an element from the stream, the function should return true if the element should be kept. if the function returns false, the element is discarded.- Returns:
- a new stream that returns only the elements satisfying the filter
-
where
public <E extends java.lang.Exception> JinqStream<T> where(JinqStream.WhereWithSource<T,E> test)
Description copied from interface:JinqStreamFilters the elements of the stream. This version allows the filter function to take a second parameter with an InQueryStreamSource. This lets the function create new streams of elements that it can use in subqueries.- Specified by:
wherein interfaceJinqStream<T>- Overrides:
wherein classNonQueryJinqStream<T>- Parameters:
test- function applied to each element of the stream. The function is passed an element from the stream as well as anInQueryStreamSource. The function should return true if the element should be kept. if the function returns false, the element is discarded.- Returns:
- a new stream that returns only the elements satisfying the filter
- See Also:
JinqStream.where(Where)
-
select
public <U> JinqStream<U> select(JinqStream.Select<T,U> select)
Description copied from interface:JinqStreamTransforms the elements in the stream. The method allows you to rewrite each element from the stream, so that they contain only certain fields or to do some calculation based on the values of the fields.JinqStream<Customer> stream = ...; JinqStream<String> result = stream.select(c -> c.getName());- Specified by:
selectin interfaceJinqStream<T>- Overrides:
selectin classNonQueryJinqStream<T>- Parameters:
select- function applied to the elements of the stream. When passed an element from the stream, the function should return a new value that should be used instead of the element in the stream.- Returns:
- a new stream that uses only the new rewritten stream elements
-
select
public <U> JinqStream<U> select(JinqStream.SelectWithSource<T,U> select)
Description copied from interface:JinqStreamTransforms the elements in the stream. This version also passes anInQueryStreamSourceto the select function so that the function can create new streams of elements to use in subqueries.- Specified by:
selectin interfaceJinqStream<T>- Overrides:
selectin classNonQueryJinqStream<T>- See Also:
JinqStream.select(Select)
-
selectAll
public <U> JinqStream<U> selectAll(JinqStream.Join<T,U> select)
Description copied from interface:JinqStreamTransforms the elements in the stream. The method allows you to rewrite each element from the stream, so that they contain only certain fields or to do some calculation based on the values of the fields. Unlike a normal select(), this method allows you to return a stream of elements. The stream elements will all be added to the final stream.JinqStream<Country> stream = ...; JinqStream<City> result = stream.selectAll(c -> JinqStream.from(c.getCities()));- Specified by:
selectAllin interfaceJinqStream<T>- Overrides:
selectAllin classNonQueryJinqStream<T>- Parameters:
select- function applied to the elements of the stream. When passed an element from the stream, the function should return a stream of new values that will be flattened and placed in the new stream- Returns:
- a new stream that uses only the new rewritten stream elements
- See Also:
JinqStream.select(Select)
-
selectAll
public <U> JinqStream<U> selectAll(JinqStream.JoinWithSource<T,U> select)
Description copied from interface:JinqStreamTransforms the elements in the stream. This version also passes anInQueryStreamSourceto the select function so that the function can create new streams of elements to use in subqueries.- Specified by:
selectAllin interfaceJinqStream<T>- Overrides:
selectAllin classNonQueryJinqStream<T>- See Also:
JinqStream.selectAll(Join)
-
selectAllList
public <U> JinqStream<U> selectAllList(JinqStream.JoinToIterable<T,U> select)
Description copied from interface:JinqStreamA variant of selectAll() that can be used if you want to join to a collection without the trouble of converting it to a JinqStream first.JinqStream<Country> stream = ...; JinqStream<City> result = stream.selectAll(c -> c.getCities());- Specified by:
selectAllListin interfaceJinqStream<T>- Overrides:
selectAllListin classNonQueryJinqStream<T>- Parameters:
select- function applied to the elements of the stream. When passed an element from the stream, the function should return a collection of new values that will be flattened and placed in the new stream- Returns:
- a new stream that uses only the new rewritten stream elements
- See Also:
JinqStream.selectAll(Join)
-
join
public <U> JinqStream<Pair<T,U>> join(JinqStream.Join<T,U> join)
Description copied from interface:JinqStreamPairs up each entry of the stream with a stream of related elements.JinqStream<Country> stream = ...; JinqStream<Pair<Country, City>> result = stream.join(c -> JinqStream.from(c.getCities()));- Specified by:
joinin interfaceJinqStream<T>- Overrides:
joinin classNonQueryJinqStream<T>- Parameters:
join- function applied to the elements of the stream. When passed an element from the stream, the function should return a stream of values that should be paired up with that stream element.- Returns:
- a new stream with the paired up elements
-
join
public <U> JinqStream<Pair<T,U>> join(JinqStream.JoinWithSource<T,U> join)
Description copied from interface:JinqStreamPairs up each entry of the stream with a stream of related elements. This version also passes anInQueryStreamSourceto the join function so that the function can join elements with unrelated streams of entities from a database.- Specified by:
joinin interfaceJinqStream<T>- Overrides:
joinin classNonQueryJinqStream<T>- See Also:
JinqStream.join(Join)
-
joinList
public <U> JinqStream<Pair<T,U>> joinList(JinqStream.JoinToIterable<T,U> join)
Description copied from interface:JinqStreamA variant of join() that can be used if you want to join to a collection without the trouble of converting it to a JinqStream first.- Specified by:
joinListin interfaceJinqStream<T>- Overrides:
joinListin classNonQueryJinqStream<T>- See Also:
JinqStream.join(Join)
-
leftOuterJoin
public <U> JinqStream<Pair<T,U>> leftOuterJoin(JinqStream.Join<T,U> join)
Description copied from interface:JinqStreamPairs up each entry of the stream with a stream of related elements. Uses a left outer join during the pairing up process, so even if an element is not joined with anything, a pair will still be created in the output stream consisting of the element paired with null.JinqStream<Country> stream = ...; JinqStream<Pair<Country, Mountain>> result = stream.leftOuterJoin(c -> JinqStream.from(c.getMountain())); JinqStream<Pair<Country, Mountain>> result = stream.leftOuterJoin(c -> JinqStream.of(c.getHighestMountain()));- Specified by:
leftOuterJoinin interfaceJinqStream<T>- Overrides:
leftOuterJoinin classNonQueryJinqStream<T>- Parameters:
join- function applied to the elements of the stream. When passed an element from the stream, the function should return a stream of values that should be paired up with that stream element. The function must use a JPA association or navigational link as the base for the stream returned. Both singular or plural associations are allowed.- Returns:
- a new stream with the paired up elements
- See Also:
JinqStream.join(Join)
-
leftOuterJoinList
public <U> JinqStream<Pair<T,U>> leftOuterJoinList(JinqStream.JoinToIterable<T,U> join)
Description copied from interface:JinqStreamA variant of leftOuterJoin() that can be used if you want to join to a collection without the trouble of converting it to a JinqStream first.- Specified by:
leftOuterJoinListin interfaceJinqStream<T>- Overrides:
leftOuterJoinListin classNonQueryJinqStream<T>- See Also:
JinqStream.leftOuterJoin(Join)
-
leftOuterJoin
public <U> JinqStream<Pair<T,U>> leftOuterJoin(JinqStream.JoinWithSource<T,U> join, JinqStream.WhereForOn<T,U> on)
Description copied from interface:JinqStreamPairs up each entry of the stream with a stream of related elements. Uses a left outer join during the pairing up process, so even if an element is not joined with anything, a pair will still be created in the output stream consisting of the element paired with null. This version also passes anInQueryStreamSourceto the join function so that the function can join elements with unrelated streams of entities from a database and an ON clause can be specified that will determine which elements from the two streams will be joined together.JinqStream<Country> stream = ...; JinqStream<Pair<Country, Mountain>> result = stream.leftOuterJoin( (c, source) -> source.stream(Mountain.class), (country, mountain) -> country.getName().equals(mountain.getCountry()));- Specified by:
leftOuterJoinin interfaceJinqStream<T>- Overrides:
leftOuterJoinin classNonQueryJinqStream<T>- Parameters:
join- function applied to the elements of the stream. When passed an element from the stream, the function should return a stream of values that should be paired up with that stream element. The function must use a JPA association or navigational link as the base for the stream returned. Both singular or plural associations are allowed.on- this is a comparison function that returns true if the elements from the two streams should be joined together. It is similar to a standard where() clause except that the elements from the two streams are passed in as separate parameters for convenience (as opposed to being passed in as a pair)- Returns:
- a new stream with the paired up elements
- See Also:
JinqStream.leftOuterJoin(Join)
-
crossJoin
public <U> JinqStream<Pair<T,U>> crossJoin(JinqStream<U> join)
Description copied from interface:JinqStreamPerforms a full cross-join of the elements of two streams.- Specified by:
crossJoinin interfaceJinqStream<T>- Overrides:
crossJoinin classNonQueryJinqStream<T>- Parameters:
join- other stream to perform the cross join with- Returns:
- a new stream where each element of the stream is paired up with each element of the join stream
-
groupToTuple
protected <U,W extends Tuple> JinqStream<W> groupToTuple(JinqStream.Select<T,U> select, JinqStream.AggregateGroup<U,T,?>[] aggregates)
- Overrides:
groupToTuplein classNonQueryJinqStream<T>
-
count
public long count()
Description copied from interface:JinqStreamCounts the elements in the stream. If the stream contains only a single field of data (i.e. not a tuple) as derived from a database query, then the count will be of non-NULL elements only. If the stream contains more than one field of data (i.e. a tuple) or if the stream is streaming in-memory data, then the count will include NULL values.- Specified by:
countin interfaceJinqStream<T>- Specified by:
countin interfacejava.util.stream.Stream<T>- Overrides:
countin classLazyWrappedStream<T>- See Also:
Stream.count()
-
sumInteger
public java.lang.Long sumInteger(JinqStream.CollectInteger<T> aggregate)
Description copied from interface:JinqStreamCalculates a sum over the elements of a stream. Different sum methods are provided for calculating the sum of integer, long, double, BigDecimal, and BigInteger values.JinqStream<City> stream = ...; long totalPopulation = stream.sumInteger(c -> c.getPopulation());- Specified by:
sumIntegerin interfaceJinqStream<T>- Overrides:
sumIntegerin classNonQueryJinqStream<T>- Parameters:
aggregate- function applied to each element of the stream. When passed an element of the stream, it should return the value that should be added to the sum.- Returns:
- the sum of the values returned by the function
-
sumLong
public java.lang.Long sumLong(JinqStream.CollectLong<T> aggregate)
- Specified by:
sumLongin interfaceJinqStream<T>- Overrides:
sumLongin classNonQueryJinqStream<T>- See Also:
JinqStream.sumInteger(CollectInteger)
-
sumDouble
public java.lang.Double sumDouble(JinqStream.CollectDouble<T> aggregate)
- Specified by:
sumDoublein interfaceJinqStream<T>- Overrides:
sumDoublein classNonQueryJinqStream<T>- See Also:
JinqStream.sumInteger(CollectInteger)
-
sumBigDecimal
public java.math.BigDecimal sumBigDecimal(JinqStream.CollectBigDecimal<T> aggregate)
- Specified by:
sumBigDecimalin interfaceJinqStream<T>- Overrides:
sumBigDecimalin classNonQueryJinqStream<T>- See Also:
JinqStream.sumInteger(CollectInteger)
-
sumBigInteger
public java.math.BigInteger sumBigInteger(JinqStream.CollectBigInteger<T> aggregate)
- Specified by:
sumBigIntegerin interfaceJinqStream<T>- Overrides:
sumBigIntegerin classNonQueryJinqStream<T>- See Also:
JinqStream.sumInteger(CollectInteger)
-
max
public <V extends java.lang.Comparable<V>> V max(JinqStream.CollectComparable<T,V> aggregate)
Description copied from interface:JinqStreamFinds the largest or maximum element of a stream.JinqStream<Student> stream = ...; Date birthdayOfYoungest = stream.max(s -> s.getBirthday());- Specified by:
maxin interfaceJinqStream<T>- Overrides:
maxin classNonQueryJinqStream<T>- Parameters:
aggregate- function applied to each element of the stream. When passed an element of the stream, it should return the value that should be compared.- Returns:
- the maximum of the values returned by the function
-
min
public <V extends java.lang.Comparable<V>> V min(JinqStream.CollectComparable<T,V> aggregate)
Description copied from interface:JinqStreamFinds the smallest or minimum element of a stream.JinqStream<Student> stream = ...; Date birthdayOfOldest = stream.min(s -> s.getBirthday());- Specified by:
minin interfaceJinqStream<T>- Overrides:
minin classNonQueryJinqStream<T>- Parameters:
aggregate- function applied to each element of the stream. When passed an element of the stream, it should return the value that should be compared.- Returns:
- the minimum of the values returned by the function
- See Also:
JinqStream.max(CollectComparable)
-
avg
public <V extends java.lang.Number & java.lang.Comparable<V>> java.lang.Double avg(JinqStream.CollectNumber<T,V> aggregate)
Description copied from interface:JinqStreamFinds the average of the elements of a stream.JinqStream<Student> stream = ...; double averageAge = stream.avg(s -> s.getage());- Specified by:
avgin interfaceJinqStream<T>- Overrides:
avgin classNonQueryJinqStream<T>- Parameters:
aggregate- function applied to each element of the stream. When passed an element of the stream, it should return the value that should be included in the average- Returns:
- the average of the values returned by the function
-
sortedBy
public <V extends java.lang.Comparable<V>> JinqStream<T> sortedBy(JinqStream.CollectComparable<T,V> sorter)
Description copied from interface:JinqStreamSorts the elements of a stream in ascending order based on the value returned. The sort is stable, so it is possible to sort the stream multiple times in order to have multiple sort keys. The last sort becomes the primary sort key, and earlier sorts become lesser keys.- Specified by:
sortedByin interfaceJinqStream<T>- Overrides:
sortedByin classNonQueryJinqStream<T>- Parameters:
sorter- function applied to each element of the stream. When passed an element of the stream, it should return the value that should be used as the sorting value of the element- Returns:
- sorted stream
-
sortedDescendingBy
public <V extends java.lang.Comparable<V>> JinqStream<T> sortedDescendingBy(JinqStream.CollectComparable<T,V> sorter)
Description copied from interface:JinqStreamSorts the elements of a stream in descending order based on the value returned.- Specified by:
sortedDescendingByin interfaceJinqStream<T>- Overrides:
sortedDescendingByin classNonQueryJinqStream<T>- Parameters:
sorter- function applied to each element of the stream. When passed an element of the stream, it should return the value that should be used as the sorting value of the element- Returns:
- sorted stream
- See Also:
JinqStream.sortedBy(CollectComparable)
-
limit
public JinqStream<T> limit(long n)
- Specified by:
limitin interfaceJinqStream<T>- Specified by:
limitin interfacejava.util.stream.Stream<T>- Overrides:
limitin classNonQueryJinqStream<T>
-
skip
public JinqStream<T> skip(long n)
- Specified by:
skipin interfaceJinqStream<T>- Specified by:
skipin interfacejava.util.stream.Stream<T>- Overrides:
skipin classNonQueryJinqStream<T>
-
distinct
public JinqStream<T> distinct()
- Specified by:
distinctin interfaceJinqStream<T>- Specified by:
distinctin interfacejava.util.stream.Stream<T>- Overrides:
distinctin classNonQueryJinqStream<T>
-
getDebugQueryString
public java.lang.String getDebugQueryString()
Description copied from interface:JinqStreamReturns the query that Jinq will send to the database to generate the values of the stream.- Specified by:
getDebugQueryStringin interfaceJinqStream<T>- Overrides:
getDebugQueryStringin classNonQueryJinqStream<T>- Returns:
- the database query string or
nullif Jinq cannot find a database query equivalent to the contents of the stream.
-
setHint
public JinqStream<T> setHint(java.lang.String name, java.lang.Object value)
Description copied from interface:JinqStreamSets a hint on the stream for how the query should be executed- Specified by:
setHintin interfaceJinqStream<T>- Overrides:
setHintin classNonQueryJinqStream<T>- Parameters:
name- name of the hint to changevalue- value to assign to the hint- Returns:
- a pointer to the stream, to make it easier to chain method calls on the stream
-
-