本文整理汇总了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;
}
示例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;
}
示例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);
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}