Typo MeanfulIterator

This commit is contained in:
thatsIch 2014-09-21 02:19:30 +02:00
parent 9696953273
commit d88f0e6f13
2 changed files with 45 additions and 45 deletions

View file

@ -156,7 +156,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
@Override
synchronized public Iterator iterator()
{
return new MeanfulIterator( records.values().iterator() );
return new MeaningfulIterator( records.values().iterator() );
}
@Override

View file

@ -1,44 +1,44 @@
package appeng.util.item;
import java.util.Iterator;
import appeng.api.storage.data.IAEStack;
public class MeanfulIterator<StackType extends IAEStack> implements Iterator
{
final Iterator<StackType> parent;
private StackType next;
public MeanfulIterator(Iterator<StackType> iterator) {
parent = iterator;
}
@Override
public boolean hasNext()
{
while (parent.hasNext())
{
next = parent.next();
if ( next.isMeaningful() )
return true;
else
parent.remove(); // self cleaning :3
}
return false;
}
@Override
public Object next()
{
return next;
}
@Override
public void remove()
{
parent.remove();
}
}
package appeng.util.item;
import java.util.Iterator;
import appeng.api.storage.data.IAEStack;
public class MeaningfulIterator<StackType extends IAEStack> implements Iterator
{
final Iterator<StackType> parent;
private StackType next;
public MeaningfulIterator(Iterator<StackType> iterator) {
parent = iterator;
}
@Override
public boolean hasNext()
{
while (parent.hasNext())
{
next = parent.next();
if ( next.isMeaningful() )
return true;
else
parent.remove(); // self cleaning :3
}
return false;
}
@Override
public Object next()
{
return next;
}
@Override
public void remove()
{
parent.remove();
}
}