当前位置: 首页>>代码示例>>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;未经允许,请勿转载。