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 Object implements Examiner<R>
An abstract implementation of an examiner.
- Since:
- 1.0.0
-
Constructor Summary
Constructors Constructor Description AbstractExaminer() -
Method Summary
Modifier and Type Method Description protected abstract <E> @NonNull Rarray(@NonNull E[] array, @NonNull Stream<R> elements)Examines an array.protected abstract <E> @NonNull Rcollection(@NonNull Collection<E> collection, @NonNull Stream<R> elements)Examines a collection.protected abstract @NonNull Rexaminable(@NonNull String name, @NonNull Stream<Map.Entry<String,R>> properties)Examines an examinable.@NonNull Rexamine(@NonNull String name, @NonNull Stream<? extends ExaminableProperty> properties)Examines.@NonNull Rexamine(@Nullable Object value)Examines.protected abstract <K, V> @NonNull Rmap(@NonNull Map<K,V> map, @NonNull Stream<Map.Entry<R,R>> entries)Examines a map.protected abstract @NonNull Rnil()Examinesnull.protected abstract @NonNull Rscalar(@NonNull Object value)Examines a scalar value.protected abstract @NonNull Rstream(@NonNull DoubleStream stream)Examines a stream.protected abstract @NonNull Rstream(@NonNull IntStream stream)Examines a stream.protected abstract @NonNull Rstream(@NonNull LongStream stream)Examines a stream.protected abstract <T> @NonNull Rstream(@NonNull Stream<T> stream)Examines a stream.
-
Constructor Details
-
AbstractExaminer
public AbstractExaminer()
-
-
Method Details
-
examine
Description copied from interface:ExaminerExamines. -
array
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 Collection<E> collection, @NonNull 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
-
examine
public @NonNull R examine(@NonNull String name, @NonNull Stream<? extends ExaminableProperty> properties)Description copied from interface:ExaminerExamines. -
examinable
protected abstract @NonNull R examinable(@NonNull String name, @NonNull Stream<Map.Entry<String,R>> properties)Examines an examinable.- Parameters:
name- the examinable nameproperties- the examinable properties- Returns:
- the result from examining an examinable
-
map
protected abstract <K, V> @NonNull R map(@NonNull Map<K,V> map, @NonNull Stream<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
-