Skip navigation links
A C D E F G I M N O P R S T U V W Z _ 

A

accept(T) - Method in interface com.aol.cyclops.matcher.Action
 
Action<T> - Interface in com.aol.cyclops.matcher
Serializable Consumer which allows Generic type information to be captured
ActionWithReturnWrapper<T,X> - Class in com.aol.cyclops.matcher.builders
 
ActionWithReturnWrapper(Action<T>) - Constructor for class com.aol.cyclops.matcher.builders.ActionWithReturnWrapper
 
ActiveCase<T,R,X extends java.util.function.Function<T,R>> - Class in com.aol.cyclops.matcher
A functionally compositional class that represents a pattern matching Case Consists of a Predicate and a Function When match is called, if the predicate holds the function is executed
ActiveCase() - Constructor for class com.aol.cyclops.matcher.ActiveCase
 
ADTPredicateBuilder<T> - Class in com.aol.cyclops.matcher.builders
Predicate Builder for Algebraic Data Types Can be used to recursively match on ADTs
ADTPredicateBuilder() - Constructor for class com.aol.cyclops.matcher.builders.ADTPredicateBuilder
 
allMatch(Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Build a Case which is triggered when all of the supplied Hamcrest Matchers holds
and(Predicate<T>) - Method in interface com.aol.cyclops.matcher.Case
Create a new case which ands the supplied predicate with the current predicate.
andOfType(Class<T>) - Method in interface com.aol.cyclops.matcher.Case
Add a guard that assures input is of specified type.
andOfValue(T) - Method in interface com.aol.cyclops.matcher.Case
Add a guard that assures input is of specified type.
andThen(Case<R, T1, ? extends Function<R, T1>>) - Method in interface com.aol.cyclops.matcher.Case
Provide a Case that will be run only if this one matches successfully The result of the current case will be the input into the supplied case Both cases have to be successful to return a result from match
andThen(Cases<R, T1, ? extends Function<R, T1>>) - Method in interface com.aol.cyclops.matcher.Case
Add a set of Cases that will be run if this case matches successfull
andThenFunction(Function<R, T>) - Method in interface com.aol.cyclops.matcher.Case
Creates a new Case that will execute the supplied function after current function if current predicate holds.
andWithValues(Object...) - Method in interface com.aol.cyclops.matcher.Case
Insert a guard that decomposes input values and compares against the supplied values Recursive decomposition is possible via Predicates.type and Predicates.with methods
ANY() - Static method in class com.aol.cyclops.matcher.Predicates
 
ANY(Class) - Static method in class com.aol.cyclops.matcher.Predicates
Match against any object that is an instance of supplied type
anyMatch(Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Build a Case which is triggered when any of the supplied Hamcrest Matchers holds
append(int, Case<T, R, X>) - Method in class com.aol.cyclops.matcher.Cases
Append an individual case with supplied Cases inserted at index
apply(T) - Method in class com.aol.cyclops.matcher.builders.ActionWithReturnWrapper
 
apply(Object) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
 
apply(Object) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
apply(T) - Method in class com.aol.cyclops.matcher.Cases
 
apply(T) - Method in interface com.aol.cyclops.matcher.Extractor
 
apply(T) - Method in interface com.aol.cyclops.matcher.TypedFunction
 
asStreamFunction() - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
 
asStreamFunction() - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
asStreamFunction() - Method in class com.aol.cyclops.matcher.Cases
assertThat(Cases.of(Case.of(input->true,input->"hello")).asStreamFunction().apply(10).findFirst().get(),is("hello"));
asUnwrappedFunction() - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
 
asUnwrappedFunction() - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
asUnwrappedFunction() - Method in class com.aol.cyclops.matcher.Cases
assertThat(Cases.of(Case.of(input->true,input->"hello")).asUnwrappedFunction().apply(10),is("hello"));
at(int) - Static method in class com.aol.cyclops.matcher.Extractors
Iterate to position and retieve value at position in an iterable data structure.

C

Case<T,R,X extends java.util.function.Function<T,R>> - Interface in com.aol.cyclops.matcher
An interface / trait for building functionally compositional pattern matching cases Consists of a Predicate and a Function When match is called, if the predicate holds the function is executed
CaseBeingBuilt - Class in com.aol.cyclops.matcher.builders
 
CaseBeingBuilt() - Constructor for class com.aol.cyclops.matcher.builders.CaseBeingBuilt
 
CaseBuilder - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder
 
CaseBuilder.InCaseOfBuilder<V> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.InCaseOfBuilderExtractor<T,R,X> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.InCaseOfBuilderExtractor.InCaseOfStep<V> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.InCaseOfBuilderExtractor.InCaseOfValueStep<V,X> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.InCaseOfBuilderExtractor.InMatchOf<V> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.InCaseOfThenExtractStep<T,X,R> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.InMatchOfBuilder<V,X> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.InMatchOfBuilder.InMatchOfThenExtract<V,X,R> - Class in com.aol.cyclops.matcher.builders
 
CaseBuilder.ValueStep<V,X> - Class in com.aol.cyclops.matcher.builders
 
CaseComprehender - Class in com.aol.cyclops.matcher.comprehenders
 
CaseComprehender() - Constructor for class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
caseOf(Predicate<V>, Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
caseOf(Extractor<T, R>, Predicate<R>, Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
caseOfMany(Action<List<V>>, Predicate<V>...) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Match against an iterable using supplied predicates.
caseOfPredicates(Two<Predicate<V>, Predicate<V1>>, Action<R>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Run both predicates in the supplied tuple against the first two elements of a supplied iterable for matching
caseOfThenExtract(Predicate<V>, Action<R>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
caseOfTuple(Iterable, Action<R>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Match against a tuple of predicates (or prototype values, or hamcrest matchers).
caseOfType(Extractor<T, R>, Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Match by type specified in Extractor as input, if user provided type via match, matches the Action (Action extends Consumer) will be executed and provided with the result of the extraction.
caseOfType(Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
caseOfValue(R, Extractor<T, R>, Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Match by specified value against the extracted value from user input.
caseOfValue(V, Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Match by specified value and then execute supplied action.
cases() - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
 
Cases<T,R,X extends java.util.function.Function<T,R>> - Class in com.aol.cyclops.matcher
Represents an ordered list of pattern matching cases.
CasesComprehender - Class in com.aol.cyclops.matcher.comprehenders
 
CasesComprehender() - Constructor for class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
ChainOfResponsibility<T,R> - Interface in com.aol.cyclops.matcher
Interface for implementing StreamOfResponsibility Implementing Classes will be used as Predicate & Action (Function) when building Cases.
CheckType<R> - Class in com.aol.cyclops.matcher.builders
 
CheckType() - Constructor for class com.aol.cyclops.matcher.builders.CheckType
 
CheckValues<X,T> - Class in com.aol.cyclops.matcher.builders
 
CheckValues() - Constructor for class com.aol.cyclops.matcher.builders.CheckValues
 
CollectionStep<T,X> - Interface in com.aol.cyclops.matcher.builders
 
com.aol.cyclops.matcher - package com.aol.cyclops.matcher
 
com.aol.cyclops.matcher.builders - package com.aol.cyclops.matcher.builders
 
com.aol.cyclops.matcher.comprehenders - package com.aol.cyclops.matcher.comprehenders
 
compose(Case<T1, T, ? extends Function<T1, T>>) - Method in interface com.aol.cyclops.matcher.Case
Provide a Case that will be executed before the current one.
composeAnd(Predicate<T1>, Function<T1, T>) - Method in interface com.aol.cyclops.matcher.Case
Compose a new Case which executes the Predicate and function supplied before the current predicate and function.
composeFunction(Function<T1, T>) - Method in interface com.aol.cyclops.matcher.Case
Creates a new Case that will execute the supplied function before current function if current predicate holds.
composeOr(Case<T1, T, ? extends Function<T1, T>>) - Method in interface com.aol.cyclops.matcher.Case
Provide a Case that will be executed before the current one.

D

decompose() - Static method in class com.aol.cyclops.matcher.Extractors
 

E

ElementCase<X> - Class in com.aol.cyclops.matcher.builders
Pattern Matcher Case Builder for matching against a single element
ElementCase() - Constructor for class com.aol.cyclops.matcher.builders.ElementCase
 
empty - Static variable in interface com.aol.cyclops.matcher.Case
 
empty() - Static method in interface com.aol.cyclops.matcher.Case
 
empty() - Method in class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
empty() - Method in class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
EmptyCase<T,R> - Class in com.aol.cyclops.matcher
Represents an empty pattern matching case
EmptyCase() - Constructor for class com.aol.cyclops.matcher.EmptyCase
 
extract(Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Preprocess the user supplied matching data in some way before it meets the predicate or action for this Case
Extractor<T,R> - Interface in com.aol.cyclops.matcher
Interface representing an extracting from one value to another extends Function and adds Serializability
Extractors - Class in com.aol.cyclops.matcher
Generic extractors for use s pre and post data extractors.
Extractors() - Constructor for class com.aol.cyclops.matcher.Extractors
 

F

filter(Predicate<Two<Predicate<T>, X>>) - Method in interface com.aol.cyclops.matcher.Case
Filter this case with the supplied predicate Some options here are to filter based on success of predicate execution return values from function execution if using ActionWithReturn for function instances on Generic parameter types Custom function types with additional info can be used with Case
filter(Predicate<Case<T, R, X>>) - Method in class com.aol.cyclops.matcher.Cases
Filter the Cases with the supplied predicate
filter(Case, Predicate) - Method in class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
filter(Cases, Predicate) - Method in class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
filterFunction(Predicate<Function<T, R>>) - Method in class com.aol.cyclops.matcher.Cases
Filter the Cases with the supplied predicate
filterPredicate(Predicate<Predicate<T>>) - Method in class com.aol.cyclops.matcher.Cases
Filter the Cases with the supplied predicate
first() - Static method in class com.aol.cyclops.matcher.Extractors
Return element or first element in an Iterable.
flatMap(Function<Two<Predicate<T>, X>, Case<T1, R1, X1>>) - Method in interface com.aol.cyclops.matcher.Case
Create a new Case from the supplied Function
flatMap(Function<Case<T, R, X>, Cases<T1, R1, X1>>) - Method in class com.aol.cyclops.matcher.Cases
Expand each Case into a Cases object allowing 1:Many expansion of Cases
flatMap(Case, Function) - Method in class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
flatMap(Cases, Function) - Method in class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
flatMapAll(Function<PStack<Case<T, R, X>>, Cases<T1, R1, X1>>) - Method in class com.aol.cyclops.matcher.Cases
Map to a new Cases instance via a function that is provided all current Cases
forEach(Consumer<Case<T, R, X>>) - Method in class com.aol.cyclops.matcher.Cases
Iterate over each case

G

get() - Method in class com.aol.cyclops.matcher.ActiveCase
 
get() - Method in interface com.aol.cyclops.matcher.Case
 
get() - Method in class com.aol.cyclops.matcher.Cases
 
get() - Method in class com.aol.cyclops.matcher.EmptyCase
 
get(int) - Static method in class com.aol.cyclops.matcher.Extractors
Look up element at position in a list
get(K) - Static method in class com.aol.cyclops.matcher.Extractors
 
getAction() - Method in interface com.aol.cyclops.matcher.Case
 
getPatternMatcher() - Method in class com.aol.cyclops.matcher.builders.CheckValues
 
getPredicate() - Method in interface com.aol.cyclops.matcher.Case
 
getTargetClass() - Method in class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
getTargetClass() - Method in class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
getType() - Method in interface com.aol.cyclops.matcher.Action
 
getType() - Method in interface com.aol.cyclops.matcher.Extractor
 
getType() - Method in interface com.aol.cyclops.matcher.TypedFunction
 

I

inCaseOf(Predicate<V>, TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inCaseOf(Extractor<T, R>, Predicate<V>, TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
InCaseOfBuilder() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilder
 
InCaseOfBuilderExtractor() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor
 
inCaseOfMany(TypedFunction<List<V>, X>, Predicate<V>...) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inCaseOfManyType(Predicate, TypedFunction<T, X>, Predicate<V>...) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inCaseOfPredicates(Two<Predicate<V>, Predicate<V1>>, TypedFunction<R, X>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
InCaseOfStep() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor.InCaseOfStep
 
inCaseOfStream(Stream<Predicate>, TypedFunction<R, X>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inCaseOfThenExtract(Predicate<T>, TypedFunction<R, X>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
InCaseOfThenExtractStep() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfThenExtractStep
 
inCaseOfType(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inCaseOfType(Extractor<T, R>, TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inCaseOfValue(V, TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inCaseOfValue(V, Extractor<T, R>, TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
InCaseOfValueStep() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor.InCaseOfValueStep
 
InMatchOf() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor.InMatchOf
 
inMatchOf(Matcher<V>, TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
hamcrest
inMatchOf(Extractor<T, R>, Matcher<V>, TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
InMatchOfBuilder() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InMatchOfBuilder
 
inMatchOfMany(TypedFunction<List<V>, X>, Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inMatchOfMatchers(Two<Matcher<V>, Matcher<V1>>, TypedFunction<R, X>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
inMatchOfSeq(Stream<Matcher>, TypedFunction<R, X>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
InMatchOfThenExtract() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.InMatchOfBuilder.InMatchOfThenExtract
 
inMatchOfThenExtract(Matcher<T>, TypedFunction<R, X>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
instanceOfT(Object) - Method in class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
instanceOfT(Object) - Method in class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
isEmpty() - Method in interface com.aol.cyclops.matcher.Case
 
isMatch(Matcher<V>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor
Add a Hamcrest Matcher as a Predicate for this Case
isMatch(Matcher<V>) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Build a Case which is triggered when the supplied Hamcrest Matcher holds
isNotEmpty() - Method in interface com.aol.cyclops.matcher.Case
 
isTrue(Predicate<V>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor
Add Predicate for this Case
isTrue(Predicate<V>) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Build a Case which is triggered when the supplied Predicate holds
isType(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor
Construct a Case that will trigger when user input is the same type (V) as supplied ActionWithReturn If triggered the ActionWithReturn will be executed and it's result will be the match result.
isType(TypedFunction<T, R>) - Method in class com.aol.cyclops.matcher.builders.CheckType
Create a completed Case which is triggered when matching input is of the same type (T) as the input parameter to ActionWithReturn.
isType(TypedFunction<T, R>) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Create a completed Case which is triggered when matching input is of the same type (T) as the input parameter to ActionWithReturn.
isValue(V) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor
Build a Case which is triggered when the user input matches the supplied Value (via Objects.equals)
isValue(V) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Build a Case which is triggered when the user input matches the supplied Value (via Objects.equals)
iterator() - Method in class com.aol.cyclops.matcher.Two
 

M

map(Function<Two<Predicate<T>, X>, Two<Predicate<T1>, X1>>) - Method in interface com.aol.cyclops.matcher.Case
Allows both the predicate and function in the current case to be replaced in a new Case
map(Function<Case<T, R, X>, Case<T1, R1, X1>>) - Method in class com.aol.cyclops.matcher.Cases
Map all Case instances present to a different value
map(Case, Function) - Method in class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
map(Cases, Function) - Method in class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
mapFunction(Function<Function<T, R>, X1>) - Method in interface com.aol.cyclops.matcher.Case
Allows the current function to be replaced by another
mapFunction(Function<Function<T, R>, Function<T, R1>>) - Method in class com.aol.cyclops.matcher.Cases
Map all the functions to another function
mapPredicate(Function<Predicate<T>, Predicate<T>>) - Method in interface com.aol.cyclops.matcher.Case
Allows the predicate to be replaced with one returned from the supplied function E.g.
mapPredicate(Function<Predicate<T>, Predicate<T>>) - Method in class com.aol.cyclops.matcher.Cases
Map predicates for all Cases with the supplied function
match(Object...) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Aggregates supplied objects into a List for matching against
match(Object) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
 
match(Object...) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Aggregates supplied objects into a List for matching against
match(Object) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
match(T) - Method in interface com.aol.cyclops.matcher.Case
Match against the supplied value.
match(Object...) - Method in class com.aol.cyclops.matcher.Cases
Aggregates supplied objects into a List for matching against
match(T) - Method in class com.aol.cyclops.matcher.Cases
 
match(T) - Method in class com.aol.cyclops.matcher.EmptyCase
 
matchAsync(Executor, T) - Method in interface com.aol.cyclops.matcher.Case
Similar to Match, but executed asynchonously on supplied Executor.
matchAsync(Executor, Object...) - Method in class com.aol.cyclops.matcher.Cases
Aggregates supplied objects into a List for matching asynchronously against
matchFromStream(Stream) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Each input element can generated a single matched value
matchFromStream(Stream) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Each input element can generated a single matched value
matchFromStream(Stream<T>) - Method in class com.aol.cyclops.matcher.Cases
Each input element can generated a single matched value
matchFromStreamAsync(Executor, Stream<T>) - Method in class com.aol.cyclops.matcher.Cases
Execute matchFromStream asynchronously
Matching - Class in com.aol.cyclops.matcher.builders
Pattern Matching builder
Matching() - Constructor for class com.aol.cyclops.matcher.builders.Matching
 
MatchingInstance<T,X> - Class in com.aol.cyclops.matcher.builders
Pattern Matching builder instance
MatchingInstance() - Constructor for class com.aol.cyclops.matcher.builders.MatchingInstance
 
matchMany(Object) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
 
matchMany(Object) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
matchMany(T) - Method in class com.aol.cyclops.matcher.Cases
List<String> results = Cases.of(Case.of((Integer input)->10==input,input->"hello"), Case.of(input->11==input,input->"world"), Case.of(input->10==input,input->"woo!")) .<String>matchMany(10).toList(); assertThat(results.size(),is(2)); assertThat(results,hasItem("hello")); assertThat(results,hasItem("woo!"));
matchManyAsync(Executor, T) - Method in class com.aol.cyclops.matcher.Cases
Match many asynchronously
matchManyFromStream(Stream) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Each input element can generated multiple matched values
matchManyFromStream(Stream) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Each input element can generated multiple matched values
matchManyFromStream(Stream<T>) - Method in class com.aol.cyclops.matcher.Cases
Each input element in the stream can generate multiple matched values
matchManyFromStreamAsync(Executor, Stream) - Method in class com.aol.cyclops.matcher.Cases
Asynchronously match against a Stream of data, on the supplied executor Each input element in the stream can generate multiple matched values
matchOf(Matcher<V>, Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
matchOf(Extractor<T, R>, Matcher<R>, Action<V>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
matchOfMany(Action<List<V>>, Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Match against an iterable using supplied hamcrest matchers.
matchOfMatchers(Two<Matcher<V>, Matcher<V1>>, Action<R>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Run both matchers in the supplied tuple against the first two elements of a supplied iterable for matching
matchOfThenExtract(Matcher<V>, Action<V>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
matchOfTuple(Iterable, Action<R>, Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
memoised(Extractor<T, R>) - Static method in class com.aol.cyclops.matcher.Extractors
An extractor that caches the extraction result
merge(Cases<T, R, X>) - Method in class com.aol.cyclops.matcher.Cases
Merge two cases, with supplied Cases added after current Cases

N

negate() - Method in interface com.aol.cyclops.matcher.Case
 
negate(X) - Method in interface com.aol.cyclops.matcher.Case
 
noneMatch(Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.ElementCase
Build a Case which is triggered when none of the supplied Hamcrest Matchers holds

O

of(Cases<T, X, ? extends Function<T, X>>) - Static method in class com.aol.cyclops.matcher.builders.Matching
Create a Pattern Matcher Builder from supplied Cases
of(Predicate<T>, X) - Static method in interface com.aol.cyclops.matcher.Case
Construct an instance of Case from supplied predicate and action
of(Two<Predicate<T>, X>) - Static method in interface com.aol.cyclops.matcher.Case
Construct an instance of Case from supplied Tuple of predicate and action
of(Case<T, R, X>...) - Static method in class com.aol.cyclops.matcher.Cases
Construct a Cases instance from an array Pattern Matching Cases Will execute sequentially when Match is called.
of(Object) - Method in class com.aol.cyclops.matcher.comprehenders.CaseComprehender
 
of(Object) - Method in class com.aol.cyclops.matcher.comprehenders.CasesComprehender
 
of(int, int) - Static method in class com.aol.cyclops.matcher.Extractors
An extractor that will generte a Tuple2 with two values at the specified index.
ofList(List<Case<T, R, X>>) - Static method in class com.aol.cyclops.matcher.Cases
Construct a Cases instance from a list of Pattern Matching Cases Will execute sequentially when Match is called.
ofPStack(PStack<Case<T, R, X>>) - Static method in class com.aol.cyclops.matcher.Cases
Construct a Cases instance from a persistent stack of Pattern Matching Cases Will execute sequentially when Match is called.
or(Predicate<T>) - Method in interface com.aol.cyclops.matcher.Case
Create a new Case that will loosen the current predicate.
or(Predicate<T1>, Function<T1, T>) - Method in interface com.aol.cyclops.matcher.Case
Syntax sugar for composeOr

P

p(Predicate<T>) - Static method in class com.aol.cyclops.matcher.Predicates
 
parallel() - Method in class com.aol.cyclops.matcher.Cases
Default behaviour is to match sequentially
PatternMatcher - Class in com.aol.cyclops.matcher.builders
PatternMatcher supports advanced pattern matching for Java 8 This is an API for creating Case instances and allows new type definitions to be supplied for each Case Features include -cases match by value -cases match by type -cases using predicates inCaseOfXXX caseOfXXX -cases using hamcrest Matchers inMatchOfXXX matchOfXXX -cases as expressions (return value) - inCaseOfXXX, inMatchOfXXX -cases as statements (no return value) - caseOfXXX, matchOfXXX -pre & post variable extraction via Extractor (@see com.aol.cyclops.matcher.Extractors) -match using iterables of predicates or hamcrest Matchers - see caseOfIterable, matchOfIterable, inCaseOfIterable, matchOfIterable -match using tuples of predicates or hamcreate Matchers - see caseOfTuple, matchOfTuple, inCaseOfTuple, inMatchOfTuple - single match (match method) - match many (matchMany) - match against a stream (single match, match many)
PatternMatcher() - Constructor for class com.aol.cyclops.matcher.builders.PatternMatcher
 
Predicates - Class in com.aol.cyclops.matcher
Some useful Predicates
Predicates() - Constructor for class com.aol.cyclops.matcher.Predicates
 

R

registerDecompositionFunction(Class<T>, Function<T, R>) - Static method in class com.aol.cyclops.matcher.Extractors
Register decomposition function in standard hashmap Global mutable state - use with care

S

same() - Static method in class com.aol.cyclops.matcher.Extractors
 
selectFrom(Stream<Two<Predicate<V>, Function<V, X>>>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
selectFromChain(Stream<? extends ChainOfResponsibility<V, X>>) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
 
sequential() - Method in class com.aol.cyclops.matcher.Cases
This is the default behaviour, cases are matched sequentially when a matching function is called
size() - Method in class com.aol.cyclops.matcher.Cases
 
Step<T,X> - Interface in com.aol.cyclops.matcher.builders
 

T

then(TypedFunction<T, X>) - Method in class com.aol.cyclops.matcher.builders._LastStep
 
thenApply(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilder
Create a new Case with the supplied ActionWithReturn as the action
thenApply(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor.InCaseOfStep
 
thenApply(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor.InCaseOfValueStep
 
thenApply(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilderExtractor.InMatchOf
 
thenApply(TypedFunction<R, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfThenExtractStep
 
thenApply(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InMatchOfBuilder.InMatchOfThenExtract
 
thenApply(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InMatchOfBuilder
Create a new Case with the supplied ActionWithReturn as the action
thenApply(TypedFunction<V, X>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.ValueStep
 
thenApply(TypedFunction<T, X>) - Method in interface com.aol.cyclops.matcher.builders.CollectionStep
Create a new Case with the supplied ActionWithReturn as the action
thenApply(TypedFunction<T, X>) - Method in interface com.aol.cyclops.matcher.builders.Step
Create a new Case with the supplied ActionWithReturn as the action
thenConsume(Action<V>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilder
Create a new Case with the supplied ActionWithReturn as the action
thenConsume(Action<V>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InMatchOfBuilder
Create a new Case with the supplied ActionWithReturn as the action
thenConsume(Action<T>) - Method in interface com.aol.cyclops.matcher.builders.CollectionStep
Create a new Case with the supplied ActionWithReturn as the action
thenConsume(Action<T>) - Method in interface com.aol.cyclops.matcher.builders.Step
Create a new Case with the supplied ActionWithReturn as the action
thenExtract(Extractor<T, R>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InCaseOfBuilder
Post-process input supplied to matching, so input to Action will be different from input to Predicate The supplied Extractor will transform input into new value which will be supplied to the Action.
thenExtract(Extractor<? extends V, R>) - Method in class com.aol.cyclops.matcher.builders.CaseBuilder.InMatchOfBuilder
 
tuple(T1, T2) - Static method in class com.aol.cyclops.matcher.Two
 
Two<T1,T2> - Class in com.aol.cyclops.matcher
 
Two() - Constructor for class com.aol.cyclops.matcher.Two
 
type(Class<T>) - Static method in class com.aol.cyclops.matcher.Predicates
Recursively decompose and match against case classes of specified type.
TypedFunction<T,X> - Interface in com.aol.cyclops.matcher
Serializable function which allows Generic type information to be captured

U

unapply(Decomposable) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Immediately decompose the supplied parameter and pass it to the PatternMatcher for matching
unapply(Decomposable) - Method in class com.aol.cyclops.matcher.builders.PatternMatcher
Decomposes the supplied input via it's unapply method Provides a List to the Matcher of values to match on
unapply(Decomposable) - Method in class com.aol.cyclops.matcher.Cases
Decomposes the supplied input via it's unapply method Provides a List to the Matcher of values to match on
unzip() - Method in class com.aol.cyclops.matcher.Cases
val cases = Cases.of(Case.of(input->true,input->"hello")); val unzipped = cases.unzip(); assertTrue(unzipped.v1.map(p->p.test(10)).allMatch(v->v)); assertTrue(unzipped.v2.map(fn->fn.apply(10)).allMatch(v->"hello".equals(v)));

V

v1 - Variable in class com.aol.cyclops.matcher.Two
 
v2 - Variable in class com.aol.cyclops.matcher.Two
 
ValueStep() - Constructor for class com.aol.cyclops.matcher.builders.CaseBuilder.ValueStep
 

W

when() - Static method in class com.aol.cyclops.matcher.builders.Matching
Create a builder for Matching against a provided Object as is (i.e.
when() - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Create a builder for Matching against a provided Object as is (i.e.
whenAllMatch(Matcher<V>...) - Static method in class com.aol.cyclops.matcher.builders.Matching
Build a Case which is triggered when all of the supplied Hamcrest Matchers holds
whenAllMatch(Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Build a Case which is triggered when all of the supplied Hamcrest Matchers holds
whenAnyMatch(Matcher<V>...) - Static method in class com.aol.cyclops.matcher.builders.Matching
Build a Case which is triggered when any of the supplied Hamcrest Matchers holds
whenAnyMatch(Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Build a Case which is triggered when any of the supplied Hamcrest Matchers holds
whenIsMatch(Matcher<V>) - Static method in class com.aol.cyclops.matcher.builders.Matching
Build a Case which is triggered when the supplied Hamcrest Matcher holds
whenIsMatch(Matcher<V>) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Build a Case which is triggered when the supplied Hamcrest Matcher holds
whenIsTrue(Predicate<V>) - Static method in class com.aol.cyclops.matcher.builders.Matching
Build a Case which is triggered when the supplied Predicate holds
whenIsTrue(Predicate<V>) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Build a Case which is triggered when the supplied Predicate holds
whenIsType(TypedFunction<T, R>) - Static method in class com.aol.cyclops.matcher.builders.Matching
Create a completed Case which is triggered when matching input is of the same type (T) as the input parameter to ActionWithReturn.
whenIsType(TypedFunction<T, R>) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Create a completed Case which is triggered when matching input is of the same type (T) as the input parameter to ActionWithReturn.
whenIsValue(V) - Static method in class com.aol.cyclops.matcher.builders.Matching
Build a Case which is triggered when the user input matches the supplied Value (via Objects.equals)
whenIsValue(V) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Build a Case which is triggered when the user input matches the supplied Value (via Objects.equals)
whenNoneMatch(Matcher<V>...) - Static method in class com.aol.cyclops.matcher.builders.Matching
Build a Case which is triggered when none of the supplied Hamcrest Matchers holds
whenNoneMatch(Matcher<V>...) - Method in class com.aol.cyclops.matcher.builders.MatchingInstance
Build a Case which is triggered when none of the supplied Hamcrest Matchers holds
with(V...) - Method in class com.aol.cyclops.matcher.builders.ADTPredicateBuilder
Generate a predicate that determines the provided values hold.
with(V...) - Method in class com.aol.cyclops.matcher.builders.CheckValues
Provide a comparison value, JDK 8 Predicate, or Hamcrest Matcher for each Element to match on.
with(V...) - Static method in class com.aol.cyclops.matcher.Predicates
Recursively compose an Object without specifying a type
withType(Class<T>) - Method in class com.aol.cyclops.matcher.builders._Simpler_Case
 

Z

zip(Stream<Predicate<T>>, Stream<X>) - Static method in class com.aol.cyclops.matcher.Cases
Zip two Streams into pattern Matching Cases

_

__ - Static variable in class com.aol.cyclops.matcher.Predicates
wildcard predicate
_LastStep<X,V,T> - Class in com.aol.cyclops.matcher.builders
 
_LastStep() - Constructor for class com.aol.cyclops.matcher.builders._LastStep
 
_Simpler_Case<X> - Class in com.aol.cyclops.matcher.builders
 
_Simpler_Case() - Constructor for class com.aol.cyclops.matcher.builders._Simpler_Case
 
A C D E F G I M N O P R S T U V W Z _ 
Skip navigation links