当前位置: 首页>>代码示例>>Java>>正文


Java Attribute.getValues方法代码示例

本文整理汇总了Java中com.googlecode.cqengine.attribute.Attribute.getValues方法的典型用法代码示例。如果您正苦于以下问题:Java Attribute.getValues方法的具体用法?Java Attribute.getValues怎么用?Java Attribute.getValues使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.googlecode.cqengine.attribute.Attribute的用法示例。


在下文中一共展示了Attribute.getValues方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, HybridTimestamp> attribute, O object, QueryOptions
        queryOptions) {
    Query<O> actualQuery = query == null ? queryFunction.apply(object) : query;
    Optional<Boolean> terminatedQuery = terminatedQuery(object, actualQuery, queryOptions);
    if (terminatedQuery.isPresent()) {
        return terminatedQuery.get();
    }
    Iterable<HybridTimestamp> values = attribute.getValues(object, queryOptions);
    List<Query<O>> conditions = StreamSupport.stream(values.spliterator(), false)
                                             .map(v -> greaterThan(timestampAttribute, v))
                                             .collect(Collectors.toList());
    Query<O> timestampQuery = conditions.size() == 1 ? conditions.get(0) : new Or<>(conditions);
    IndexedCollection<O> collection = (IndexedCollection<O>) getCollection(queryOptions);
    try (ResultSet<O> resultSet = collection.retrieve(and(
            actualQuery,
            timestampQuery))) {
        return matches(resultSet, actualQuery, object, queryOptions);
    }
}
 
开发者ID:eventsourcing,项目名称:es4j,代码行数:21,代码来源:IsLatestEntity.java

示例2: ensureTargetIsFound

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
private void ensureTargetIsFound(Attribute<EntityHandle<O>, A> attribute, QueryOptions queryOptions) {
    if (target == null) {
        Iterable<EntityHandle<O>> collection = queryOptions.get(Iterable.class);
        if (collection == null) {
            throw new RuntimeException(
                    toString() + " has to be supported by the target index or queryOptions should" +
                    " include IndexedCollection key");
        }
        Iterator<EntityHandle<O>> iterator = collection.iterator();
        A targetValue = null;
        while (iterator.hasNext()) {
            EntityHandle<O> next = iterator.next();
            Iterable<A> values = attribute.getValues(next, queryOptions);
            for (A value : values) {
                if (target == null || isBetterValue(value, targetValue)) {
                    target = next;
                    targetValue = value;
                }
            }
        }
    }
}
 
开发者ID:eventsourcing,项目名称:es4j,代码行数:23,代码来源:ComparingQuery.java

示例3: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, Object> attribute, O object,
                                            QueryOptions queryOptions) {
    for (Object attributeValue : attribute.getValues(object, queryOptions)) {
        if (attributeValue.equals(getValue())) {
            return true;
        }
    }
    return false;
}
 
开发者ID:eventsourcing,项目名称:es4j,代码行数:11,代码来源:MemoryIndexEngine.java

示例4: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A value : attribute.getValues(object, queryOptions)) {
        if (this.value.covers(value)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:strato-cumulus,项目名称:cqspatial,代码行数:10,代码来源:Covers.java

示例5: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for(A attributeValue : attribute.getValues(object, queryOptions)) {
        if(value.contains(attributeValue)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:strato-cumulus,项目名称:cqspatial,代码行数:10,代码来源:Contains.java

示例6: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for(A value : attribute.getValues(object, queryOptions)) {
        if(value.intersects(this.value)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:strato-cumulus,项目名称:cqspatial,代码行数:10,代码来源:Intersects.java

示例7: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A value : attribute.getValues(object, queryOptions)) {
        if (value.compareTo(this.value) == 0) {
            return true;
        }
    }
    return false;
}
 
开发者ID:strato-cumulus,项目名称:cqspatial,代码行数:10,代码来源:EqualTo.java

示例8: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for(A value : attribute.getValues(object, queryOptions)) {
        if(value.overlaps(this.value)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:strato-cumulus,项目名称:cqspatial,代码行数:10,代码来源:Overlaps.java

示例9: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A value : attribute.getValues(object, queryOptions)) {
        if (value.disjoint(this.value)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:strato-cumulus,项目名称:cqspatial,代码行数:10,代码来源:Disjoint.java

示例10: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A attributeValue : attribute.getValues(object, queryOptions)) {
        // Same as string contains, except we swap the arguments...
        if (StringContains.containsFragment(value, attributeValue)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:npgall,项目名称:cqengine,代码行数:11,代码来源:StringIsContainedIn.java

示例11: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A attributeValue : attribute.getValues(object, queryOptions)) {
        if (value.equals(attributeValue)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:npgall,项目名称:cqengine,代码行数:10,代码来源:Equal.java

示例12: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A attributeValue : attribute.getValues(object, queryOptions)) {
        if (containsFragment(attributeValue, value)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:npgall,项目名称:cqengine,代码行数:10,代码来源:StringContains.java

示例13: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A attributeValue : attribute.getValues(object, queryOptions)) {
        if (attributeValue != null) {
            return true;
        }
    }
    return false;
}
 
开发者ID:npgall,项目名称:cqengine,代码行数:10,代码来源:Has.java

示例14: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A attributeValue : attribute.getValues(object, queryOptions)) {
        if (values.contains(attributeValue)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:npgall,项目名称:cqengine,代码行数:10,代码来源:In.java

示例15: matchesNonSimpleAttribute

import com.googlecode.cqengine.attribute.Attribute; //导入方法依赖的package包/类
@Override
protected boolean matchesNonSimpleAttribute(Attribute<O, A> attribute, O object, QueryOptions queryOptions) {
    for (A attributeValue : attribute.getValues(object, queryOptions)) {
        if (matchesValue(attributeValue, queryOptions)) {
            return true;
        }
    }
    return false;
}
 
开发者ID:npgall,项目名称:cqengine,代码行数:10,代码来源:StringEndsWith.java


注:本文中的com.googlecode.cqengine.attribute.Attribute.getValues方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。