public int bitsRequiredForField(String fieldName) {
        int maxBitsRequiredForField = shards[0].bitsRequiredForField(fieldName);
        
        for(int i=1;i<shards.length;i++) {
            int shardRequiredBits = shards[i].bitsRequiredForField(fieldName);
            if(shardRequiredBits > maxBitsRequiredForField)
                maxBitsRequiredForField = shardRequiredBits;
        }
        
        return maxBitsRequiredForField;
    }
public int bitsRequiredForField(String fieldName) {
        int maxBitsRequiredForField = shards[0].bitsRequiredForField(fieldName);
        
        for(int i=1;i<shards.length;i++) {
            int shardRequiredBits = shards[i].bitsRequiredForField(fieldName);
            if(shardRequiredBits > maxBitsRequiredForField)
                maxBitsRequiredForField = shardRequiredBits;
        }
        
        return maxBitsRequiredForField;
    }
public int bitsRequiredForField ( String fieldName ) { int maxBitsRequiredForField = shards [ 0 ] . bitsRequiredForField ( fieldName ) ; for ( int i = 1 ; i < shards . length ; i ++ ) { int shardRequiredBits = shards [ i ] . bitsRequiredForField ( fieldName ) ; if ( shardRequiredBits > maxBitsRequiredForField ) maxBitsRequiredForField = shardRequiredBits ; } return maxBitsRequiredForField ; }
Warning:  Not thread-safe.  Should only be called within the update thread.
@param fieldName the field name
@return the number of bits required for the field
Warning : Not thread - safe . Should only be called within the update thread .