public static List<GatewayAddress> asList(final String addresses) {
        if (addresses == null) {
            throw new IllegalArgumentException("addresses must not be null");
        }

        List<GatewayAddress> list = new ArrayList<GatewayAddress>();
        final String[] tokens = addresses.split(",");
        if (tokens == null) {
            return list;
        }

        int id = 1;
        for (String token : tokens) {
            list.add(new GatewayAddress(id++, token));
        }

        return list;
    }
public static List<GatewayAddress> asList(final String addresses) {
        if (addresses == null) {
            throw new IllegalArgumentException("addresses must not be null");
        }

        List<GatewayAddress> list = new ArrayList<GatewayAddress>();
        final String[] tokens = addresses.split(",");
        if (tokens == null) {
            return list;
        }

        int id = 1;
        for (String token : tokens) {
            list.add(new GatewayAddress(id++, token));
        }

        return list;
    }
public static List < GatewayAddress > asList ( final String addresses ) { if ( addresses == null ) { throw new IllegalArgumentException ( "addresses must not be null" ) ; } List < GatewayAddress > list = new ArrayList < GatewayAddress > ( ) ; final String [ ] tokens = addresses . split ( "," ) ; if ( tokens == null ) { return list ; } int id = 1 ; for ( String token : tokens ) { list . add ( new GatewayAddress ( id ++ , token ) ) ; } return list ; }
As list.

@param addresses the addresses
@return the list
As list .