Package net.kyori.examination
Class AbstractExaminer<R>
java.lang.Object
net.kyori.examination.AbstractExaminer<R>
- Type Parameters:
R- the result type
- All Implemented Interfaces:
Examiner<R>
public abstract class AbstractExaminer<R> extends java.lang.Object implements Examiner<R>
An abstract implementation of an examiner.
-
Constructor Summary
Constructors Constructor Description AbstractExaminer() -
Method Summary
Modifier and Type Method Description protected abstract <E> @NonNull Rarray(@NonNull E[] array, @NonNull java.util.stream.Stream<R> elements)Examines an array.protected abstract <E> @NonNull Rcollection(@NonNull java.util.Collection<E> collection, @NonNull java.util.stream.Stream<R> elements)Examines a collection.protected abstract @NonNull Rexaminable(@NonNull Examinable examinable, @NonNull java.util.stream.Stream<java.util.Map.Entry<java.lang.String,R>> properties)Examines an examinable.@NonNull Rexamine(@Nullable java.lang.Object value)Examines.protected abstract <K, V> @NonNull Rmap(@NonNull java.util.Map<K,V> map, @NonNull java.util.stream.Stream<java.util.Map.Entry<R,R>> entries)Examines a map.protected abstract @NonNull Rnil()Examinesnull.protected abstract @NonNull Rscalar(@NonNull java.lang.Object value)Examines a scalar value.protected abstract @NonNull Rstream(@NonNull java.util.stream.DoubleStream stream)Examines a stream.protected abstract @NonNull Rstream(@NonNull java.util.stream.IntStream stream)Examines a stream.protected abstract @NonNull Rstream(@NonNull java.util.stream.LongStream stream)Examines a stream.protected abstract <T> @NonNull Rstream(@NonNull java.util.stream.Stream<T> stream)Examines a stream.
-
Constructor Details
-
AbstractExaminer
public AbstractExaminer()
-
-
Method Details
-
examine
Description copied from interface:ExaminerExamines. -
array
protected abstract <E> @NonNull R array(@NonNull E[] array, @NonNull java.util.stream.Stream<R> elements)Examines an array.- Type Parameters:
E- the element type- Parameters:
array- the arrayelements- the array elements- Returns:
- the result from examining an array
-
collection
protected abstract <E> @NonNull R collection(@NonNull java.util.Collection<E> collection, @NonNull java.util.stream.Stream<R> elements)Examines a collection.- Type Parameters:
E- the element type- Parameters:
collection- the collectionelements- the collection elements- Returns:
- the result from examining a collection
-
examinable
protected abstract @NonNull R examinable(@NonNull Examinable examinable, @NonNull java.util.stream.Stream<java.util.Map.Entry<java.lang.String,R>> properties)Examines an examinable.- Parameters:
examinable- the examinableproperties- the examinable properties- Returns:
- the result from examining an examinable
-
map
protected abstract <K, V> @NonNull R map(@NonNull java.util.Map<K,V> map, @NonNull java.util.stream.Stream<java.util.Map.Entry<R,R>> entries)Examines a map.- Type Parameters:
K- the key typeV- the value type- Parameters:
map- the mapentries- the map entries- Returns:
- the result from examining a map
-
nil
Examinesnull.- Returns:
- the result from examining
null
-
scalar
Examines a scalar value.- Parameters:
value- the scalar value- Returns:
- the result from examining a scalar
-
stream
Examines a stream.- Type Parameters:
T- the type- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-
stream
Examines a stream.- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-
stream
Examines a stream.- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-
stream
Examines a stream.- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-