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

org.rapidoid.fluent.Find Maven / Gradle / Ivy

There is a newer version: 5.4.6
Show newest version
package org.rapidoid.fluent;

import org.rapidoid.fluent.find.*;

import java.util.Map;
import java.util.stream.Stream;

/*
 * #%L
 * rapidoid-fluent
 * %%
 * Copyright (C) 2014 - 2016 Nikolche Mihajlovski and contributors
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

/**
 * @author Nikolche Mihajlovski
 * @since 5.0.0
 */
public class Find {

	public static  FindFirst firstOf(Iterable items) {
		return new FindFirst(Do.stream(items));
	}

	public static  FindFirstBi firstOf(Map items) {
		return new FindFirstBi(items);
	}

	public static  FindFirst firstOf(Stream stream) {
		return new FindFirst(Do.stream(stream));
	}

	public static  FindAll allOf(Iterable items) {
		return new FindAll(Do.stream(items));
	}

	public static  FindAllBi allOf(Map items) {
		return new FindAllBi(items);
	}

	public static  FindAll allOf(Stream stream) {
		return new FindAll(Do.stream(stream));
	}

	public static  FindAny anyOf(Iterable items) {
		return new FindAny(Do.stream(items));
	}

	public static  FindAnyBi anyOf(Map items) {
		return new FindAnyBi(items);
	}

	public static  FindAny anyOf(Stream stream) {
		return new FindAny(Do.stream(stream));
	}

	public static  FindLast lastOf(Iterable items) {
		return new FindLast(Do.stream(items));
	}

	public static  FindLastBi lastOf(Map items) {
		return new FindLastBi(items);
	}

	public static  FindLast lastOf(Stream stream) {
		return new FindLast(Do.stream(stream));
	}

	public static  FindIn in(Iterable items) {
		return new FindIn(Do.stream(items));
	}

	public static  FindInBi in(Map items) {
		return new FindInBi(items);
	}

	public static  FindIn in(Stream stream) {
		return new FindIn(Do.stream(stream));
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy