예제 #1
0
 @Override
 public boolean equals(Object obj) {
   if (!(obj instanceof BoxProvider)) return false;
   final BoxProvider other = (BoxProvider) obj;
   BoxProviderResult resultOther = other.get();
   if (resultOther.isTemporary()) return false;
   return box.equals(resultOther.getBox());
 }
예제 #2
0
 public Rectangle getBox() {
   if (boxProvider != null) {
     BoxProviderResult result = boxProvider.get();
     if (!result.isTemporary()) {
       box = result.getBox();
       boxProvider = null;
     }
     return result.getBox();
   }
   return box;
 }