Created
January 15, 2012 21:21
-
-
Save hfaulds/1617390 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void render(final GL2 gl) { | |
| ArrayUtils.map(elements, new MapFunction<OctNode>(){ | |
| public void map(OctNode input) { | |
| input.render(gl); | |
| } | |
| } | |
| ); | |
| } | |
| public class ArrayUtils{ | |
| public static <T> void map(T[] array, MapFunction<T> function) { | |
| for(T item : array) | |
| function.map(item); | |
| } | |
| } | |
| public abstract class MapFunction<T> { | |
| public abstract void map(T input); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment