public synchronized Platform queryCapability(Capability capability) throws NoCapablePlatformException {
  Platform platform=preferences.get(checkNotNull(capability));
  if (platform != null) {
    return platform;
  }
 else {
    throw new NoCapablePlatformException("No platform was found supporting " + capability.name());
  }
}

public synchronized Platform queryCapability ( Capability capability ) throws NoCapablePlatformException { Platform platform = preferences . get ( checkNotNull ( capability ) ) ; if ( platform != null ) { return platform ; } else { throw new NoCapablePlatformException ( "No platform was found supporting " + capability . name ( ) ) ; } }
get the preferred platform for handling a certain capability . returns null if none is available .
