Model find(final Object object, final Model model) {
   if (model.equals(object)) {
     return model;
   }
   for (final Model child : model.getChildren()) {
     final Model match = find(object, child);
     if (match != null) {
       return match;
     }
   }
   return null;
 }
示例#2
0
 public static boolean type(final Model model) {
   return (!model.isCollection() && !model.getChildren().isEmpty());
 }