public ImapConfiguration build() { ImmutableSet<String> normalizeDisableCaps = disabledCaps.stream() .filter(Builder::noBlankString) .map(StringUtils::normalizeSpace) .collect(Guavate.toImmutableSet()); return new ImapConfiguration( enableIdle.orElse(DEFAULT_ENABLE_IDLE), idleTimeInterval.orElse(DEFAULT_HEARTBEAT_INTERVAL_IN_SECONDS), idleTimeIntervalUnit.orElse(DEFAULT_HEARTBEAT_INTERVAL_UNIT), normalizeDisableCaps, isCondstoreEnable.orElse(DEFAULT_CONDSTORE_DISABLE)); } }