public static boolean isNotEmpty(Map<?, ?> map) { return !isEmpty(map); }
public static <E> List<E> fromMapKeys(Map<? extends E, ?> map) { if (MapUtil.isEmpty(map)) { return new ArrayList<>(); } return new ArrayList<>(map.keySet()); }
public static <E> List<E> fromMapValues(Map<?, ? extends E> map) { if (MapUtil.isEmpty(map)) { return new ArrayList<>(); } return new ArrayList<>(map.values()); }
Validator.isBlank(end) || MapUtil.isEmpty(values)) {
Validator.isBlank(end) || MapUtil.isEmpty(values)) {
public static String toString( Map<?, ?> map, String hideIncludesRegex, String hideExcludesRegex) { if (isEmpty(map)) { return StringPool.OPEN_CURLY_BRACE + StringPool.CLOSE_CURLY_BRACE;
protected Set<String> getDDMFormFieldsNames(DDMForm ddmForm) { Map<String, DDMFormField> ddmFormFieldsMap = ddmForm.getDDMFormFieldsMap(true); if (MapUtil.isEmpty(ddmFormFieldsMap)) { return Collections.emptySet(); } Set<String> ddmFormFieldsNames = new HashSet<>(ddmFormFieldsMap.size()); for (String ddmFormFieldName : ddmFormFieldsMap.keySet()) { ddmFormFieldsNames.add(StringUtil.toLowerCase(ddmFormFieldName)); } return ddmFormFieldsNames; }
if (MapUtil.isEmpty(_customTokens)) { synchronized (JournalUtil.class) { _customTokens = new HashMap<>();
throws PortalException { if (MapUtil.isEmpty(layoutIdMap)) { return new long[0];
/** * @deprecated As of Judson (7.1.x), only used for backwards compatibility * with LARs that use journal schema under 1.1.0 */ @Deprecated private void _setLegacyValues(JournalArticle article) { if (MapUtil.isEmpty(article.getTitleMap()) && Validator.isNotNull(article.getLegacyTitle())) { article.setTitleMap( LocalizationUtil.getLocalizationMap(article.getLegacyTitle())); } if (MapUtil.isEmpty(article.getDescriptionMap()) && Validator.isNotNull(article.getLegacyDescription())) { article.setDescriptionMap( LocalizationUtil.getLocalizationMap( article.getLegacyDescription())); } }
protected JournalFeed getJournalFeed(Map<String, String> map) { if (MapUtil.isEmpty(map)) { return null; } JournalFeed journalFeed = null; try { String feedId = MapUtil.getString(map, "feedId"); if (Validator.isNotNull(feedId)) { long groupId = MapUtil.getLong(map, "groupId"); journalFeed = _journalFeedLocalService.getFeed(groupId, feedId); } } catch (Exception e) { if (_log.isDebugEnabled()) { _log.debug(e, e); } else if (_log.isWarnEnabled()) { _log.warn(e.getMessage()); } } return journalFeed; }
getScopeAssetPublisherAddItemHolders(1); if (MapUtil.isEmpty(scopeAssetPublisherAddItemHolders)) { return;
protected FileEntry getFileEntry(Map<String, String[]> map) { if (MapUtil.isEmpty(map)) { return null;