@Nullable
    public static <T extends IConnector> T getConnectorAs(@Nullable final Geocache cache, @NonNull final Class<T> capabilityClass) {
        if (cache == null) {
            return null;
        }
        final IConnector connector = getConnector(cache);
        if (capabilityClass.isInstance(connector)) {
            return capabilityClass.cast(connector);
        }
        return null;
    }
Get a connector capability for the given geocache. This might be {@code null} if the connector does not support
the given capability.

@return the connector cast to the requested capability or {@code null}.
main/src/main/java/cgeo/geocaching/connector/ConnectorFactory.java