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