Home | History | Annotate | Download | only in resources
      1 class Node {
      2 
      3 }
      4 
      5 class ClassCast {
      6 
      7     public static <N extends Node> List<N> getNodesByType(Node container, Class<N> clazz) {
      8         List<N> nodes = new ArrayList<N>();
      9         Node child;
     10         return clazz.cast(child);
     11     }
     12 
     13 }