- 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.
- 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.
- 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
- 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
-