@SuppressWarnings("StringEquality")
    public static MatchInfo fromAuthScope(final AuthScope authscope) {
        String newScheme = StringUtils.equals(authscope.getScheme(), AuthScope.ANY_SCHEME) ? ANY_SCHEME :
                authscope.getScheme();
        String newHost = StringUtils.equals(authscope.getHost(), AuthScope.ANY_HOST) ? ANY_HOST :
                authscope.getHost();
        int newPort = authscope.getPort() == AuthScope.ANY_PORT ? ANY_PORT : authscope.getPort();
        String newRealm = StringUtils.equals(authscope.getRealm(), AuthScope.ANY_REALM) ? ANY_REALM :
                authscope.getRealm();

        return new MatchInfo(newScheme, newHost, newPort, ANY_PATH, ANY_QUERY,
                             ANY_FRAGMENT, newRealm, ANY_METHOD);
    }
@ SuppressWarnings ( "StringEquality" ) public static MatchInfo fromAuthScope ( final AuthScope authscope ) { String newScheme = StringUtils . equals ( authscope . getScheme ( ) , AuthScope . ANY_SCHEME ) ? ANY_SCHEME : authscope . getScheme ( ) ; String newHost = StringUtils . equals ( authscope . getHost ( ) , AuthScope . ANY_HOST ) ? ANY_HOST : authscope . getHost ( ) ; int newPort = authscope . getPort ( ) == AuthScope . ANY_PORT ? ANY_PORT : authscope . getPort ( ) ; String newRealm = StringUtils . equals ( authscope . getRealm ( ) , AuthScope . ANY_REALM ) ? ANY_REALM : authscope . getRealm ( ) ; return new MatchInfo ( newScheme , newHost , newPort , ANY_PATH , ANY_QUERY , ANY_FRAGMENT , newRealm , ANY_METHOD ) ; }
Create an info object from an authscope object.

@param authscope the authscope