public boolean isCollected() {
    checkValid();
    switch (myIsCollected.get()) {
      case YES:
        return true;
      case NO:
        return false;
      default:
        try {
          boolean res = VirtualMachineProxyImpl.isCollected(myObjectReference);
          myIsCollected.set(ThreeState.fromBoolean(res));
          return res;
        }
        catch (VMDisconnectedException ignored) {
          myIsCollected.set(ThreeState.YES);
          return true;
        }
    }
  }
public boolean isCollected()