net.anwiba.commons.lang.stream.IStream Maven / Gradle / Ivy
/*
* #%L
* anwiba commons core
* %%
* Copyright (C) 2007 - 2016 Andreas Bartels
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 2.1 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Lesser Public License for more details.
*
* You should have received a copy of the GNU General Lesser Public
* License along with this program. If not, see
* .
* #L%
*/
package net.anwiba.commons.lang.stream;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.function.IntFunction;
import net.anwiba.commons.lang.collection.IObjectList;
import net.anwiba.commons.lang.functional.IAcceptor;
import net.anwiba.commons.lang.functional.IAggregator;
import net.anwiba.commons.lang.functional.IConsumer;
import net.anwiba.commons.lang.functional.IConverter;
import net.anwiba.commons.lang.functional.IFactory;
import net.anwiba.commons.lang.optional.IOptional;
public interface IStream {
public IStream distinct();
public IStream filter(IAcceptor funtion);
public IStream convert(IConverter funtion);
public IStream call(IConsumer consumer) throws E;
public Iterable asIterable() throws E;
public Collection asCollection() throws E;
public List asList() throws E;
public Map asMap(IFactory keyFactrory, IFactory valueFactrory) throws E;
public IObjectList asObjectList() throws E;
public IOptional first() throws E;
public IOptional first(IAcceptor acceptor) throws E;
public IOptional aggregate(O inital, IAggregator accumulator) throws E;
public void foreach(IConsumer consumer) throws E;
public O[] asArray(IntFunction factory) throws E;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy