mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-18 19:29:08 +00:00
- Removed the Transformer classes as transformation-based class detection is too slow
- Finished the RegisterZenClassesTask and applied it to the API & Mod support projects - Started work on the events API - Added a mod.info file - Added mods detection API
This commit is contained in:
1 parent
8b00ce34b6
commit
0c535134c5
106 files changed
+2111
-444
No files matched your search
@@ -0,0 +1,32 @@
|
||||
package stanhebben.zenscript.util;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan Hebben
|
||||
*/
|
||||
public abstract class MappingIterator<T, U> implements Iterator<U> {
|
||||
private final Iterator<T> iterator;
|
||||
|
||||
public MappingIterator(Iterator<T> iterator) {
|
||||
this.iterator = iterator;
|
||||
}
|
||||
|
||||
public abstract U map(T value);
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return iterator.hasNext();
|
||||
}
|
||||
|
||||
@Override
|
||||
public U next() {
|
||||
return map(iterator.next());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user