Package net.kyori.examination
Class AbstractExaminer<R>
- java.lang.Object
-
- net.kyori.examination.AbstractExaminer<R>
-
-
Constructor Summary
Constructors Constructor Description AbstractExaminer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract @NonNull Rarray(int length, IntFunction<R> value)Examines an array.protected abstract <E> @NonNull Rarray(E @NonNull [] 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(boolean @Nullable [] values)Examines.@NonNull Rexamine(byte @Nullable [] values)Examines.@NonNull Rexamine(char @Nullable [] values)Examines.@NonNull Rexamine(double @Nullable [] values)Examines.@NonNull Rexamine(float @Nullable [] values)Examines.@NonNull Rexamine(int @Nullable [] values)Examines.@NonNull Rexamine(long @Nullable [] values)Examines.@NonNull Rexamine(short @Nullable [] values)Examines.@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.
-
-
-
Method Detail
-
examine
public @NonNull R examine(@Nullable Object value)
Description copied from interface:ExaminerExamines.
-
array
protected abstract <E> @NonNull R array(E @NonNull [] array, @NonNull 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 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
protected abstract @NonNull R nil()
Examinesnull.- Returns:
- the result from examining
null
-
scalar
protected abstract @NonNull R scalar(@NonNull Object value)
Examines a scalar value.- Parameters:
value- the scalar value- Returns:
- the result from examining a scalar
-
stream
protected abstract <T> @NonNull R stream(@NonNull Stream<T> stream)
Examines a stream.- Type Parameters:
T- the type- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-
stream
protected abstract @NonNull R stream(@NonNull DoubleStream stream)
Examines a stream.- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-
stream
protected abstract @NonNull R stream(@NonNull IntStream stream)
Examines a stream.- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-
stream
protected abstract @NonNull R stream(@NonNull LongStream stream)
Examines a stream.- Parameters:
stream- the stream- Returns:
- the result from examining a stream
-
examine
public @NonNull R examine(boolean @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
examine
public @NonNull R examine(byte @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
examine
public @NonNull R examine(char @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
examine
public @NonNull R examine(double @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
examine
public @NonNull R examine(float @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
examine
public @NonNull R examine(int @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
examine
public @NonNull R examine(long @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
examine
public @NonNull R examine(short @Nullable [] values)
Description copied from interface:ExaminerExamines.
-
array
protected abstract @NonNull R array(int length, IntFunction<R> value)
Examines an array.- Parameters:
length- the length of the arrayvalue- the index to examined value function- Returns:
- the result from examining the array
-
-