public Iterator<String> getSpaces() {
        log.debug("getSpaces()");

        List<String> spaces = new ArrayList<>();
        List<Bucket> buckets = listAllBuckets();
        for (Bucket bucket : buckets) {
            String bucketName = bucket.getName();
            if (isSpace(bucketName)) {
                spaces.add(getSpaceId(bucketName));
            }
        }

        // sort after the bucket prefix has been stripped off
        Collections.sort(spaces);

        return spaces.iterator();
    }
public Iterator < String > getSpaces ( ) { log . debug ( "getSpaces()" ) ; List < String > spaces = new ArrayList < > ( ) ; List < Bucket > buckets = listAllBuckets ( ) ; for ( Bucket bucket : buckets ) { String bucketName = bucket . getName ( ) ; if ( isSpace ( bucketName ) ) { spaces . add ( getSpaceId ( bucketName ) ) ; } } Collections . sort ( spaces ) ; return spaces . iterator ( ) ; }
{@inheritDoc}