All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aol.cyclops.matcher.CollectionMatcher Maven / Gradle / Ivy

There is a newer version: 7.2.4
Show newest version
package com.aol.cyclops.matcher;

import com.aol.cyclops.matcher.builders.IterableCase;
import com.aol.cyclops.matcher.builders.PatternMatcher;
import com.aol.cyclops.matcher.builders.StreamCase;

public class CollectionMatcher {
	/**
	 * Create a builder for matching on the disaggregated elements of a collection.
	 * 
	 * Allows matching by type, value, JDK 8 Predicate, or Hamcrest Matcher per element
	 * 
	 * @return Iterable / Collection based Pattern Matching Builder
	 */
	public static final IterableCase whenIterable(){
		IterableCase cse = new IterableCase(new PatternMatcher());
		return cse;
	}
	
	/**
	 * Create a builder that builds Pattern Matching Cases from Streams of data.
	 * 
	 * 
	 * @return Stream based Pattern Matching Builder
	 */
	public static final  StreamCase whenFromStream(){
		StreamCase cse = new StreamCase(new PatternMatcher());
		return cse;
	}
	
	
	
	
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy