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

com.xdev.jadoth.collections.XRemovingList Maven / Gradle / Ivy

/**
 *
 */
package com.xdev.jadoth.collections;

/*-
 * #%L
 * XDEV Application Framework
 * %%
 * Copyright (C) 2003 - 2020 XDEV Software
 * %%
 * 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 3 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%
 */


import com.xdev.jadoth.lang.Equalator;
import com.xdev.jadoth.lang.functional.Predicate;
import com.xdev.jadoth.lang.functional.controlflow.TPredicate;

/**
 * @author Thomas Muenz
 *
 */
public interface XRemovingList extends XGettingList, XRemovingCollection
{
	public interface Factory extends XGettingList.Factory, XRemovingCollection.Factory
	{
		@Override
		public XRemovingList createInstance();
	}


	public E remove(int index);

	public XRemovingList removeRange(int startIndex, int endIndex);

	public E removeFirst();
	public E removeLast();

	public E rngRemoveOne(int startIndex, int endIndex, E element);
	public E rngRemoveOne(int startIndex, int endIndex, E element, Equalator equalator);

	public int rngRemove(int startIndex, int endIndex, E element);
	public int rngRemove(int startIndex, int endIndex, E element, int skip, Integer limit);

	public int rngRemove(int startIndex, int endIndex, E element, Equalator equalator);
	public int rngRemove(int startIndex, int endIndex, E element, Equalator equalator, int skip, Integer limit);

	public int rngRemoveAll(int startIndex, int endIndex, XCollection c, boolean ignoreNulls, Equalator equalator);
	public int rngRemoveAll(int startIndex, int endIndex, XCollection c, boolean ignoreNulls);

	public int rngRetainAll(int startIndex, int endIndex, XCollection c, Equalator equalator);
	public int rngRetainAll(int startIndex, int endIndex, XCollection c);

	public int rngRemoveDuplicates(int startIndex, int endIndex, boolean ignoreNulls, Equalator equalator);
	public int rngRemoveDuplicates(int startIndex, int endIndex, boolean ignoreNulls);

	public int rngReduce (int startIndex, int endIndex,  Predicate predicate);
	public int rngReduce (int startIndex, int endIndex, TPredicate predicate);
	public int rngReduce (int startIndex, int endIndex,  Predicate predicate, int skip, Integer limit);
	public int rngReduce (int startIndex, int endIndex, TPredicate predicate, int skip, Integer limit);

	public > L rngMoveTo(int startIndex, int endIndex, L target,  Predicate predicate);
	public > L rngMoveTo(int startIndex, int endIndex, L target, TPredicate predicate);
	public > L rngMoveTo(int startIndex, int endIndex, L target,  Predicate predicate, int skip, Integer limit);
	public > L rngMoveTo(int startIndex, int endIndex, L target, TPredicate predicate, int skip, Integer limit);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy