コード例 #1
0
 protected E2 getChildOf(E1 parent) {
   Collection<? extends RefObject> c = super.query(true, parent);
   assert (c.size() <= 1);
   if (c.isEmpty()) {
     return null;
   } else {
     return end2GenericClass.cast(c.iterator().next());
   }
 }
コード例 #2
0
 protected E1 getParentOf(E2 child) {
   Collection<? extends RefObject> c = super.query(false, child);
   assert (c.size() <= 1);
   if (c.isEmpty()) {
     return null;
   } else {
     return end1GenericClass.cast(c.iterator().next());
   }
 }