stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/utils/ListUtils.java [189:210]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static List<?> flatten( Collection<?> l ) {
        boolean hasCollection = false;
        for ( Object o : l ) {
            if ( o instanceof Collection ) {
                hasCollection = true;
                break;
            }
        }
        if ( !hasCollection && ( l instanceof List ) ) {
            return ( List<?> ) l;
        }
        List newList = new ArrayList();
        for ( Object o : l ) {
            if ( o instanceof List ) {
                newList.addAll( flatten( ( List ) o ) );
            }
            else {
                newList.add( o );
            }
        }
        return newList;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



stack/core/src/main/java/org/apache/usergrid/utils/ListUtils.java [188:209]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static List<?> flatten( Collection<?> l ) {
        boolean hasCollection = false;
        for ( Object o : l ) {
            if ( o instanceof Collection ) {
                hasCollection = true;
                break;
            }
        }
        if ( !hasCollection && ( l instanceof List ) ) {
            return ( List<?> ) l;
        }
        List newList = new ArrayList();
        for ( Object o : l ) {
            if ( o instanceof List ) {
                newList.addAll( flatten( ( List ) o ) );
            }
            else {
                newList.add( o );
            }
        }
        return newList;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



