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


Java TraversalHelper.addHasContainer方法代码示例

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


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

示例1: has

import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; //导入方法依赖的package包/类
/**
 * Filters vertices, edges and vertex properties based on their properties.
 *
 * @param propertyKey the key of the property to filter on
 * @param value       the value to compare the property value to for equality
 * @return the traversal with an appended {@link HasStep}
 * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#has-step" target="_blank">Reference Documentation - Has Step</a>
 * @since 3.0.0-incubating
 */
public default GraphTraversal<S, E> has(final String propertyKey, final Object value) {
    if (value instanceof P)
        return this.has(propertyKey, (P) value);
    else if (value instanceof Traversal)
        return this.has(propertyKey, (Traversal) value);
    else {
        this.asAdmin().getBytecode().addStep(Symbols.has, propertyKey, value);
        return TraversalHelper.addHasContainer(this.asAdmin(), new HasContainer(propertyKey, P.eq(value)));
    }
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:20,代码来源:GraphTraversal.java

示例2: hasLabel

import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; //导入方法依赖的package包/类
/**
 * Filters vertices, edges and vertex properties based on their label.
 *
 * @param label       the label of the {@link Element}
 * @param otherLabels additional labels of the {@link Element}
 * @return the traversal with an appended {@link HasStep}
 * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#has-step" target="_blank">Reference Documentation - Has Step</a>
 * @since 3.2.2
 */
public default GraphTraversal<S, E> hasLabel(final String label, final String... otherLabels) {
    final String[] labels = new String[otherLabels.length + 1];
    labels[0] = label;
    System.arraycopy(otherLabels, 0, labels, 1, otherLabels.length);
    this.asAdmin().getBytecode().addStep(Symbols.hasLabel, labels);
    return TraversalHelper.addHasContainer(this.asAdmin(), new HasContainer(T.label.getAccessor(), labels.length == 1 ? P.eq(labels[0]) : P.within(labels)));
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:17,代码来源:GraphTraversal.java

示例3: hasKey

import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; //导入方法依赖的package包/类
/**
 * Filters vertices, edges and vertex properties based on their key.
 *
 * @param label       the key of the {@link Element}
 * @param otherLabels additional key of the {@link Element}
 * @return the traversal with an appended {@link HasStep}
 * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#has-step" target="_blank">Reference Documentation - Has Step</a>
 * @since 3.2.2
 */
public default GraphTraversal<S, E> hasKey(final String label, final String... otherLabels) {
    final String[] labels = new String[otherLabels.length + 1];
    labels[0] = label;
    System.arraycopy(otherLabels, 0, labels, 1, otherLabels.length);
    this.asAdmin().getBytecode().addStep(Symbols.hasKey, labels);
    return TraversalHelper.addHasContainer(this.asAdmin(), new HasContainer(T.key.getAccessor(), labels.length == 1 ? P.eq(labels[0]) : P.within(labels)));
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:17,代码来源:GraphTraversal.java

示例4: hasId

import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; //导入方法依赖的package包/类
/**
 * Filters vertices, edges and vertex properties based on their identifier.
 *
 * @param predicate the filter to apply to the identifier of the {@link Element}
 * @return the traversal with an appended {@link HasStep}
 * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#has-step" target="_blank">Reference Documentation - Has Step</a>
 * @since 3.2.4
 */
public default GraphTraversal<S, E> hasId(final P<Object> predicate) {
    this.asAdmin().getBytecode().addStep(Symbols.hasId, predicate);
    return TraversalHelper.addHasContainer(this.asAdmin(), new HasContainer(T.id.getAccessor(), predicate));
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:13,代码来源:GraphTraversal.java

示例5: hasValue

import org.apache.tinkerpop.gremlin.process.traversal.util.TraversalHelper; //导入方法依赖的package包/类
/**
 * Filters vertices, edges and vertex properties based on their value.
 *
 * @param predicate the filter to apply to the value of the {@link Element}
 * @return the traversal with an appended {@link HasStep}
 * @see <a href="http://tinkerpop.apache.org/docs/${project.version}/reference/#has-step" target="_blank">Reference Documentation - Has Step</a>
 * @since 3.2.4
 */
public default GraphTraversal<S, E> hasValue(final P<Object> predicate) {
    this.asAdmin().getBytecode().addStep(Symbols.hasValue, predicate);
    return TraversalHelper.addHasContainer(this.asAdmin(), new HasContainer(T.value.getAccessor(), predicate));
}
 
开发者ID:apache,项目名称:tinkerpop,代码行数:13,代码来源:GraphTraversal.java


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