package appeng.util.prioitylist; import java.util.ArrayList; import java.util.List; import appeng.api.storage.data.IAEStack; public class MergedPriorityList> implements IPartitionList { final List> positive = new ArrayList(); final List> negative = new ArrayList(); public void addNewList(IPartitionList list, boolean isWhitelist) { if ( isWhitelist ) positive.add( list ); else negative.add( list ); } public boolean isListed(T input) { for (IPartitionList l : negative) if ( l.isListed( input ) ) return false; if ( !positive.isEmpty() ) { for (IPartitionList l : positive) if ( l.isListed( input ) ) return true; return false; } return true; } @Override public boolean isEmpty() { return positive.isEmpty() && negative.isEmpty(); } @Override public Iterable getItems() { throw new RuntimeException( "Not Implemented" ); } }