當前位置: 首頁>>代碼示例>>Java>>正文


Java Table.isEmpty方法代碼示例

本文整理匯總了Java中com.google.common.collect.Table.isEmpty方法的典型用法代碼示例。如果您正苦於以下問題:Java Table.isEmpty方法的具體用法?Java Table.isEmpty怎麽用?Java Table.isEmpty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.common.collect.Table的用法示例。


在下文中一共展示了Table.isEmpty方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty())
	{
		rejectValue(attribute, violations,
				"The \"list64\" attribute \"" + attribute.getAttributeId() + "\" has no values assigned.");
		return false;
	}
	if (values.rowKeySet().size() > MAX_SIZE)
	{
		rejectValue(attribute, violations,
				"The \"list64\" attribute \"" + attribute.getAttributeId() + "\" values total must not exceed 64.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:19,代碼來源:List64AttributeValidator.java

示例2: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty())
	{
		rejectValue(attribute, violations, "The \"set64\" attribute \"" + attribute.getAttributeId() + "\" has no values assigned.");
		return false;
	}
	if (values.rowKeySet().size() > MAX_SIZE)
	{
		rejectValue(attribute, violations,
				"The \"set64\" attribute \"" + attribute.getAttributeId() + "\" values total must not exceed 64.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:18,代碼來源:Set64AttributeValidator.java

示例3: fillAccumulationMap

import com.google.common.collect.Table; //導入方法依賴的package包/類
private void fillAccumulationMap(Map<RedisConstant, Map<String, Object>> infoMap,
                                 Table<RedisConstant, String, Long> table) {
    if (table == null || table.isEmpty()) {
        return;
    }
    Map<String, Object> accMap = infoMap.get(RedisConstant.DIFF);
    if (accMap == null) {
        accMap = new LinkedHashMap<String, Object>();
        infoMap.put(RedisConstant.DIFF, accMap);
    }
    for (RedisConstant constant : table.rowKeySet()) {
        Map<String, Long> rowMap = table.row(constant);
        accMap.putAll(rowMap);
    }
}
 
開發者ID:sohutv,項目名稱:cachecloud,代碼行數:16,代碼來源:RedisCenterImpl.java

示例4: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty())
	{
		rejectValue(attribute, violations, "The \"set\" attribute \"" + attribute.getAttributeId() + "\" has no values assigned.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:12,代碼來源:SetAttributeValidator.java

示例5: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty() || values.rowKeySet().size() != 1)
	{
		rejectValue(attribute, violations, "The \"text\" attribute can only have one value.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:12,代碼來源:TextAttributeValidator.java

示例6: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty())
	{
		rejectValue(attribute, violations, "The \"list\" attribute \"" + attribute.getAttributeId() + "\" has no values assigned.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:12,代碼來源:ListAttributeValidator.java

示例7: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty() || values.rowKeySet().size() != 1)
	{
		rejectValue(attribute, violations, "The \"asset\" attribute should cover one localized value.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:12,代碼來源:AssetAttributeValidator.java

示例8: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty() || values.rowKeySet().size() != 1)
	{
		rejectValue(attribute, violations, "The \"float\" attribute can only have one value.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:12,代碼來源:FloatAttributeValidator.java

示例9: isValidSize

import com.google.common.collect.Table; //導入方法依賴的package包/類
@Override
protected boolean isValidSize(final FhAttributeData attribute, final List<Violation> violations)
{
	final Table<Optional<String>, Optional<Locale>, String> values = attribute.getValues();
	if (values.isEmpty() || values.rowKeySet().size() != 1)
	{
		rejectValue(attribute, violations, "The \"int\" attribute can only have one value.");
		return false;
	}
	return true;
}
 
開發者ID:fredhopper,項目名稱:hybris-connector,代碼行數:12,代碼來源:IntAttributeValidator.java


注:本文中的com.google.common.collect.Table.isEmpty方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。