Code example for List

Methods: size, toArray

0
        if (readPreferenceType != null) {
            if (firstTagSet == null) {
                return ReadPreference.valueOf(readPreferenceType);
            } else { 
                return ReadPreference.valueOf(readPreferenceType, firstTagSet,
                        remainingTagSets.toArray(new DBObject[remainingTagSets.size()]));
            } 
        } else if (slaveOk != null) {
            if (slaveOk.equals(Boolean.TRUE)) {
                return ReadPreference.secondaryPreferred(); 
            } 
        } 
        return null; 
    } 
 
    private WriteConcern buildWriteConcern(final Boolean safe, final String w,
                                           final int wTimeout, final boolean fsync, final boolean journal) {
        if (w != null || wTimeout != 0 || fsync || journal) {
            if (w == null) {
                return new WriteConcern(1, wTimeout, fsync, journal);
            } else {