Package dev.aherscu.qa.testing.utils
Class StreamMatchers
- java.lang.Object
-
- dev.aherscu.qa.testing.utils.StreamMatchers
-
- Direct Known Subclasses:
StreamMatchersExtensions
public class StreamMatchers extends Object
-
-
Constructor Summary
Constructors Constructor Description StreamMatchers()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static <T> org.hamcrest.Matcher<Stream<T>>
allMatch(org.hamcrest.Matcher<T> matcher)
A matcher for a finite Stream of objects, all of which must match the given Matcher.static org.hamcrest.Matcher<DoubleStream>
allMatchDouble(org.hamcrest.Matcher<Double> matcher)
A matcher for a finite Stream of primitive doubles, all of which must match the given Matcher.static org.hamcrest.Matcher<IntStream>
allMatchInt(org.hamcrest.Matcher<Integer> matcher)
A matcher for a finite Stream of primitive ints, all of which must match the given Matcher.static org.hamcrest.Matcher<LongStream>
allMatchLong(org.hamcrest.Matcher<Long> matcher)
A matcher for a finite Stream of primitive longs, all of which must match the given Matcher.static <T> org.hamcrest.Matcher<Stream<T>>
anyMatch(org.hamcrest.Matcher<T> matcher)
A matcher for a finite Stream of objects, at least one of which must match the given Matcher.static org.hamcrest.Matcher<DoubleStream>
anyMatchDouble(org.hamcrest.Matcher<Double> matcher)
A matcher for a finite Stream of primitive doubles, at least one of which must match the given Matcher.static org.hamcrest.Matcher<IntStream>
anyMatchInt(org.hamcrest.Matcher<Integer> matcher)
A matcher for a finite Stream of primitive ints, at least one of which must match the given Matcher.static org.hamcrest.Matcher<LongStream>
anyMatchLong(org.hamcrest.Matcher<Long> matcher)
A matcher for a finite Stream of primitive longs, at least one of which must match the given Matcher.static <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>contains(org.hamcrest.Matcher<T>... expectedMatchers)
Deprecated.name clashes withMatchers.contains(Matcher...)
, useyieldsExactly(Matcher...)
insteadstatic <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>contains(T... expected)
Deprecated.name clashes withMatchers.contains(Object...)
, useyieldsExactly(Object...)
insteadstatic <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>empty()
Deprecated.name clashes withMatchers.empty()
, useyieldsNothing()
insteadstatic <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>equalTo(S expected)
Deprecated.name clashes withMatchers.equalTo(Object)
, useyieldsSameAs(BaseStream)
insteadstatic org.hamcrest.Matcher<DoubleStream>
startsWith(DoubleStream expected, long limit)
A matcher for potentially infinite Streams of primitive doubles where the first limit items from each must be equalstatic org.hamcrest.Matcher<IntStream>
startsWith(IntStream expected, long limit)
A matcher for potentially infinite Streams of primitive ints where the first limit items from each must be equalstatic org.hamcrest.Matcher<LongStream>
startsWith(LongStream expected, long limit)
A matcher for potentially infinite Streams of primitive ints where the first limit items from each must be equalstatic <T> org.hamcrest.Matcher<Stream<T>>
startsWith(Stream<T> expected, long limit)
A matcher for potentially infinite Streams of objects where the first limit items from each must be equalstatic <T> org.hamcrest.Matcher<Stream<T>>
startsWith(T... expected)
A matcher for a potentially infinite Stream of objects against n expected items, matching if the first n items produced by the Stream equal the expected items in order.static <T> org.hamcrest.Matcher<Stream<T>>
startsWithAll(org.hamcrest.Matcher<T> matcher, long limit)
A matcher for potentially infinite Streams of objects, the first limit of which must match the given Matcherstatic org.hamcrest.Matcher<DoubleStream>
startsWithAllDouble(org.hamcrest.Matcher<Double> matcher, long limit)
A matcher for potentially infinite Streams of primitive doubles, the first limit of which must match the given Matcherstatic org.hamcrest.Matcher<IntStream>
startsWithAllInt(org.hamcrest.Matcher<Integer> matcher, long limit)
A matcher for potentially infinite Streams of primitive ints, the first limit of which must match the given Matcherstatic org.hamcrest.Matcher<LongStream>
startsWithAllLong(org.hamcrest.Matcher<Long> matcher, long limit)
A matcher for potentially infinite Streams of primitive longs, the first limit of which must match the given Matcherstatic <T> org.hamcrest.Matcher<Stream<T>>
startsWithAny(org.hamcrest.Matcher<T> matcher, long limit)
A matcher for potentially infinite Streams of objects, at least one of the first limit of which must match the given Matcherstatic org.hamcrest.Matcher<DoubleStream>
startsWithAnyDouble(org.hamcrest.Matcher<Double> matcher, long limit)
A matcher for potentially infinite Streams of primitive doubles, at least one of the first limit of which must match the given Matcherstatic org.hamcrest.Matcher<IntStream>
startsWithAnyInt(org.hamcrest.Matcher<Integer> matcher, long limit)
A matcher for potentially infinite Streams of primitive ints, at least one of the first limit of which must match the given Matcherstatic org.hamcrest.Matcher<LongStream>
startsWithAnyLong(org.hamcrest.Matcher<Long> matcher, long limit)
A matcher for potentially infinite Streams of primitive longs, at least one of the first limit of which must match the given Matcherstatic org.hamcrest.Matcher<DoubleStream>
startsWithDouble(double... expected)
A matcher for a potentially infinite Stream of primitive doubles against n expected items, matching if the first n items produced by the Stream equal the expected items in order.static org.hamcrest.Matcher<IntStream>
startsWithInt(int... expected)
A matcher for a potentially infinite Stream of primitive ints against n expected items, matching if the first n items produced by the Stream equal the expected items in order.static org.hamcrest.Matcher<LongStream>
startsWithLong(long... expected)
A matcher for a potentially infinite Stream of primitive longs against n expected items, matching if the first n items produced by the Stream equal the expected items in order.static <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>yieldsExactly(org.hamcrest.Matcher<T>... expectedMatchers)
The BaseStream must produce exactly the given expected items in order, and no more.static <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>yieldsExactly(T... expected)
The BaseStream must produce exactly the given expected items in order, and no more.static <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>yieldsNothing()
Matcher for a stream which yields no elements.static <T,S extends BaseStream<T,? extends S>>
org.hamcrest.Matcher<S>yieldsSameAs(S expected)
A matcher for a finite Stream producing the same number of items as the expected Stream, and producing equal items as expected in the same order.
-
-
-
Method Detail
-
yieldsNothing
public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> yieldsNothing()
Matcher for a stream which yields no elements.- Type Parameters:
T
- The type of itemsS
- The type of the BaseStream
-
empty
@Deprecated public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> empty()
Deprecated.name clashes withMatchers.empty()
, useyieldsNothing()
insteadMatcher for an empty stream.- Type Parameters:
T
- The type of itemsS
- The type of the BaseStream
-
yieldsSameAs
public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> yieldsSameAs(S expected)
A matcher for a finite Stream producing the same number of items as the expected Stream, and producing equal items as expected in the same order. For infinite Streams usestartsWith(java.util.stream.Stream<T>, long)
- Type Parameters:
T
- The type of items produced by each BaseStreamS
- The type of BaseStream- Parameters:
expected
- A BaseStream against which to compare- See Also:
startsWith(java.util.stream.Stream<T>, long)
,startsWithInt(int...)
,startsWithLong(long...)
,startsWithDouble(double...)
-
equalTo
@Deprecated public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> equalTo(S expected)
Deprecated.name clashes withMatchers.equalTo(Object)
, useyieldsSameAs(BaseStream)
insteadA matcher for a finite Stream producing the same number of items as the expected Stream, and producing equal items as expected in the same order.- Type Parameters:
T
- The type of items produced by each BaseStreamS
- The type of BaseStream- Parameters:
expected
- A BaseStream against which to compare
-
startsWith
public static <T> org.hamcrest.Matcher<Stream<T>> startsWith(Stream<T> expected, long limit)
A matcher for potentially infinite Streams of objects where the first limit items from each must be equal- Type Parameters:
T
- The type of items produced by each Stream- Parameters:
expected
- A Stream to check againstlimit
- Only check this number of items from actual Stream- See Also:
equalTo(S)
,startsWithInt(int...)
,startsWithLong(long...)
,startsWithDouble(double...)
-
startsWith
public static org.hamcrest.Matcher<DoubleStream> startsWith(DoubleStream expected, long limit)
A matcher for potentially infinite Streams of primitive doubles where the first limit items from each must be equal- Parameters:
expected
- A Stream to check againstlimit
- Only check this number of items from actual Stream- See Also:
equalTo(S)
,startsWith(java.util.stream.Stream<T>, long)
,startsWithInt(int...)
,startsWithLong(long...)
-
startsWith
public static org.hamcrest.Matcher<IntStream> startsWith(IntStream expected, long limit)
A matcher for potentially infinite Streams of primitive ints where the first limit items from each must be equal- Parameters:
expected
- A Stream to check againstlimit
- Only check this number of items from actual Stream- See Also:
equalTo(S)
,startsWith(java.util.stream.Stream<T>, long)
,startsWithLong(long...)
,startsWithDouble(double...)
-
startsWith
public static org.hamcrest.Matcher<LongStream> startsWith(LongStream expected, long limit)
A matcher for potentially infinite Streams of primitive ints where the first limit items from each must be equal- Parameters:
expected
- A Stream to check againstlimit
- Only check this number of items from actual Stream- See Also:
equalTo(S)
,startsWith(java.util.stream.Stream<T>, long)
,startsWithInt(int...)
,startsWithDouble(double...)
-
startsWithAll
public static <T> org.hamcrest.Matcher<Stream<T>> startsWithAll(org.hamcrest.Matcher<T> matcher, long limit)
A matcher for potentially infinite Streams of objects, the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
allMatch(org.hamcrest.Matcher<T>)
,startsWithAllLong(org.hamcrest.Matcher<java.lang.Long>, long)
,startsWithAllInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,startsWithAllDouble(org.hamcrest.Matcher<java.lang.Double>, long)
-
startsWithAllLong
public static org.hamcrest.Matcher<LongStream> startsWithAllLong(org.hamcrest.Matcher<Long> matcher, long limit)
A matcher for potentially infinite Streams of primitive longs, the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
allMatchLong(org.hamcrest.Matcher<java.lang.Long>)
,startsWithAll(org.hamcrest.Matcher<T>, long)
,startsWithAllInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,startsWithAllDouble(org.hamcrest.Matcher<java.lang.Double>, long)
-
startsWithAllInt
public static org.hamcrest.Matcher<IntStream> startsWithAllInt(org.hamcrest.Matcher<Integer> matcher, long limit)
A matcher for potentially infinite Streams of primitive ints, the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
allMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,startsWithAll(org.hamcrest.Matcher<T>, long)
,startsWithAllLong(org.hamcrest.Matcher<java.lang.Long>, long)
,startsWithAllDouble(org.hamcrest.Matcher<java.lang.Double>, long)
-
startsWithAllDouble
public static org.hamcrest.Matcher<DoubleStream> startsWithAllDouble(org.hamcrest.Matcher<Double> matcher, long limit)
A matcher for potentially infinite Streams of primitive doubles, the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
allMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
,startsWithAll(org.hamcrest.Matcher<T>, long)
,startsWithAllInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,startsWithAllLong(org.hamcrest.Matcher<java.lang.Long>, long)
-
startsWithAny
public static <T> org.hamcrest.Matcher<Stream<T>> startsWithAny(org.hamcrest.Matcher<T> matcher, long limit)
A matcher for potentially infinite Streams of objects, at least one of the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
anyMatch(org.hamcrest.Matcher<T>)
,startsWithAnyInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,startsWithAnyLong(org.hamcrest.Matcher<java.lang.Long>, long)
,startsWithAnyDouble(org.hamcrest.Matcher<java.lang.Double>, long)
-
startsWithAnyLong
public static org.hamcrest.Matcher<LongStream> startsWithAnyLong(org.hamcrest.Matcher<Long> matcher, long limit)
A matcher for potentially infinite Streams of primitive longs, at least one of the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
anyMatchLong(org.hamcrest.Matcher<java.lang.Long>)
,startsWithAny(org.hamcrest.Matcher<T>, long)
,startsWithAnyInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,startsWithAnyDouble(org.hamcrest.Matcher<java.lang.Double>, long)
-
startsWithAnyDouble
public static org.hamcrest.Matcher<DoubleStream> startsWithAnyDouble(org.hamcrest.Matcher<Double> matcher, long limit)
A matcher for potentially infinite Streams of primitive doubles, at least one of the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
anyMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
,startsWithAny(org.hamcrest.Matcher<T>, long)
,startsWithAnyInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,startsWithAnyLong(org.hamcrest.Matcher<java.lang.Long>, long)
-
startsWithAnyInt
public static org.hamcrest.Matcher<IntStream> startsWithAnyInt(org.hamcrest.Matcher<Integer> matcher, long limit)
A matcher for potentially infinite Streams of primitive ints, at least one of the first limit of which must match the given Matcher- Parameters:
matcher
- A matcher to apply to items produced from the Streamlimit
- Only check this number of items from the Stream- See Also:
anyMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,startsWithAny(org.hamcrest.Matcher<T>, long)
,startsWithAnyLong(org.hamcrest.Matcher<java.lang.Long>, long)
,startsWithAnyDouble(org.hamcrest.Matcher<java.lang.Double>, long)
-
yieldsExactly
@SafeVarargs public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> yieldsExactly(org.hamcrest.Matcher<T>... expectedMatchers)
The BaseStream must produce exactly the given expected items in order, and no more. For infinite BaseStreams seestartsWith(Object...)
or a primitive stream variant- Type Parameters:
T
- The type of itemsS
- The type of the BaseStream- Parameters:
expectedMatchers
- Matchers for the items that should be produced by the BaseStream- See Also:
startsWith(Object...)
,startsWithInt(int...)
,startsWithLong(long...)
,startsWithDouble(double...)
-
contains
@SafeVarargs @Deprecated public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> contains(org.hamcrest.Matcher<T>... expectedMatchers)
Deprecated.name clashes withMatchers.contains(Matcher...)
, useyieldsExactly(Matcher...)
insteadThe BaseStream must produce exactly the given expected items in order, and no more.- Type Parameters:
T
- The type of itemsS
- The type of the BaseStream- Parameters:
expectedMatchers
- Matchers for the items that should be produced by the BaseStream
-
yieldsExactly
@SafeVarargs public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> yieldsExactly(T... expected)
The BaseStream must produce exactly the given expected items in order, and no more. For infinite BaseStreams seestartsWith(Object...)
or a primitive stream variant- Type Parameters:
T
- The type of itemsS
- The type of the BaseStream- Parameters:
expected
- The items that should be produced by the BaseStream- See Also:
startsWith(Object...)
,startsWithInt(int...)
,startsWithLong(long...)
,startsWithDouble(double...)
-
contains
@SafeVarargs @Deprecated public static <T,S extends BaseStream<T,? extends S>> org.hamcrest.Matcher<S> contains(T... expected)
Deprecated.name clashes withMatchers.contains(Object...)
, useyieldsExactly(Object...)
insteadThe BaseStream must produce exactly the given expected items in order, and no more.- Type Parameters:
T
- The type of itemsS
- The type of the BaseStream- Parameters:
expected
- The items that should be produced by the BaseStream
-
allMatch
public static <T> org.hamcrest.Matcher<Stream<T>> allMatch(org.hamcrest.Matcher<T> matcher)
A matcher for a finite Stream of objects, all of which must match the given Matcher. For infinite Streams seestartsWithAll(org.hamcrest.Matcher<T>, long)
- Type Parameters:
T
- The type of items produced by the Stream- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAll(org.hamcrest.Matcher<T>, long)
,allMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,allMatchLong(org.hamcrest.Matcher<java.lang.Long>)
,allMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
-
allMatchInt
public static org.hamcrest.Matcher<IntStream> allMatchInt(org.hamcrest.Matcher<Integer> matcher)
A matcher for a finite Stream of primitive ints, all of which must match the given Matcher. For infinite Streams seestartsWithAllInt(org.hamcrest.Matcher<java.lang.Integer>, long)
- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAllInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,allMatch(org.hamcrest.Matcher<T>)
,allMatchLong(org.hamcrest.Matcher<java.lang.Long>)
,allMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
-
allMatchLong
public static org.hamcrest.Matcher<LongStream> allMatchLong(org.hamcrest.Matcher<Long> matcher)
A matcher for a finite Stream of primitive longs, all of which must match the given Matcher. For infinite Streams seestartsWithAllLong(org.hamcrest.Matcher<java.lang.Long>, long)
- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAllLong(org.hamcrest.Matcher<java.lang.Long>, long)
,allMatch(org.hamcrest.Matcher<T>)
,allMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,allMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
-
allMatchDouble
public static org.hamcrest.Matcher<DoubleStream> allMatchDouble(org.hamcrest.Matcher<Double> matcher)
A matcher for a finite Stream of primitive doubles, all of which must match the given Matcher. For infinite Streams seestartsWithAllDouble(org.hamcrest.Matcher<java.lang.Double>, long)
- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAllDouble(org.hamcrest.Matcher<java.lang.Double>, long)
,allMatch(org.hamcrest.Matcher<T>)
,allMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,allMatchLong(org.hamcrest.Matcher<java.lang.Long>)
-
anyMatch
public static <T> org.hamcrest.Matcher<Stream<T>> anyMatch(org.hamcrest.Matcher<T> matcher)
A matcher for a finite Stream of objects, at least one of which must match the given Matcher. For infinite Streams seestartsWithAny(org.hamcrest.Matcher<T>, long)
- Type Parameters:
T
- The type of items produced by the Stream- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAny(org.hamcrest.Matcher<T>, long)
,anyMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,anyMatchLong(org.hamcrest.Matcher<java.lang.Long>)
,anyMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
-
anyMatchLong
public static org.hamcrest.Matcher<LongStream> anyMatchLong(org.hamcrest.Matcher<Long> matcher)
A matcher for a finite Stream of primitive longs, at least one of which must match the given Matcher. For infinite Streams seestartsWithAnyLong(org.hamcrest.Matcher<java.lang.Long>, long)
- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAnyLong(org.hamcrest.Matcher<java.lang.Long>, long)
,anyMatch(org.hamcrest.Matcher<T>)
,anyMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,anyMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
-
anyMatchDouble
public static org.hamcrest.Matcher<DoubleStream> anyMatchDouble(org.hamcrest.Matcher<Double> matcher)
A matcher for a finite Stream of primitive doubles, at least one of which must match the given Matcher. For infinite Streams seestartsWithAnyDouble(org.hamcrest.Matcher<java.lang.Double>, long)
- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAnyDouble(org.hamcrest.Matcher<java.lang.Double>, long)
,anyMatch(org.hamcrest.Matcher<T>)
,anyMatchInt(org.hamcrest.Matcher<java.lang.Integer>)
,anyMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
-
anyMatchInt
public static org.hamcrest.Matcher<IntStream> anyMatchInt(org.hamcrest.Matcher<Integer> matcher)
A matcher for a finite Stream of primitive ints, at least one of which must match the given Matcher. For infinite Streams seestartsWithAnyInt(org.hamcrest.Matcher<java.lang.Integer>, long)
- Parameters:
matcher
- A Matcher against which to compare items from the Stream- See Also:
startsWithAnyInt(org.hamcrest.Matcher<java.lang.Integer>, long)
,anyMatch(org.hamcrest.Matcher<T>)
,anyMatchLong(org.hamcrest.Matcher<java.lang.Long>)
,anyMatchDouble(org.hamcrest.Matcher<java.lang.Double>)
-
startsWith
@SafeVarargs public static <T> org.hamcrest.Matcher<Stream<T>> startsWith(T... expected)
A matcher for a potentially infinite Stream of objects against n expected items, matching if the first n items produced by the Stream equal the expected items in order. Whether the Stream would subsequently produce additional items is irrelevant.- Type Parameters:
T
- The type of items- Parameters:
expected
- The expected items produced first by the Stream- See Also:
contains(org.hamcrest.Matcher<T>...)
,startsWithInt(int...)
,startsWithDouble(double...)
,startsWithLong(long...)
-
startsWithDouble
public static org.hamcrest.Matcher<DoubleStream> startsWithDouble(double... expected)
A matcher for a potentially infinite Stream of primitive doubles against n expected items, matching if the first n items produced by the Stream equal the expected items in order. Whether the Stream would subsequently produce additional items is irrelevant.- Parameters:
expected
- The expected items produced first by the Stream- See Also:
contains(org.hamcrest.Matcher<T>...)
,startsWith(java.util.stream.Stream<T>, long)
,startsWithInt(int...)
,startsWithLong(long...)
-
startsWithLong
public static org.hamcrest.Matcher<LongStream> startsWithLong(long... expected)
A matcher for a potentially infinite Stream of primitive longs against n expected items, matching if the first n items produced by the Stream equal the expected items in order. Whether the Stream would subsequently produce additional items is irrelevant.- Parameters:
expected
- The expected items produced first by the Stream- See Also:
contains(org.hamcrest.Matcher<T>...)
,startsWith(java.util.stream.Stream<T>, long)
,startsWithInt(int...)
,startsWithDouble(double...)
-
startsWithInt
public static org.hamcrest.Matcher<IntStream> startsWithInt(int... expected)
A matcher for a potentially infinite Stream of primitive ints against n expected items, matching if the first n items produced by the Stream equal the expected items in order. Whether the Stream would subsequently produce additional items is irrelevant.- Parameters:
expected
- The expected items produced first by the Stream- See Also:
contains(org.hamcrest.Matcher<T>...)
,startsWith(java.util.stream.Stream<T>, long)
,startsWithLong(long...)
,startsWithDouble(double...)
-
-