org.apache.jena.sparql.engine.binding.Binding.size()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(119)

本文整理了Java中org.apache.jena.sparql.engine.binding.Binding.size()方法的一些代码示例,展示了Binding.size()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Binding.size()方法的具体详情如下:
包路径:org.apache.jena.sparql.engine.binding.Binding
类名称:Binding
方法名:size

Binding.size介绍

[英]Number of (var, value) pairs.
[中](变量、值)对的数量。

代码示例

代码示例来源:origin: apache/jena

@Override
public int size()           { return binding.size() ; }

代码示例来源:origin: apache/jena

/** Compare two bindings, use the node equality test provided */
static public boolean equal(Binding bind1, Binding bind2, NodeUtils.EqualityTest test) {
  if ( bind1 == bind2 ) 
    return true ;
  if ( bind1.size() != bind2.size() )
    return false ;
  // They are the same size so containment is enough.
  if ( ! containedIn(bind1, bind2, test) ) return false ;
  return true ;
}

代码示例来源:origin: apache/jena

@Override
final public int size() {
  int x = size1();
  if ( parent != null )
    x = x + parent.size();
  return x;
}

代码示例来源:origin: apache/jena

public static boolean equals(Binding bind1, Binding bind2) {
    if ( bind1 == bind2 )
      return true;

    // Same variables?

    if ( bind1.size() != bind2.size() )
      return false;

    for ( Iterator<Var> iter1 = bind1.vars() ; iter1.hasNext() ; ) {
      Var var = iter1.next();
      Node node1 = bind1.get(var);
      Node node2 = bind2.get(var);
      if ( !Objects.equals(node1, node2) )
        return false;
    }

    // No need to check the other way round as the sizes matched.
    return true;
  }
}

代码示例来源:origin: apache/jena

if ( binding.size() == 0 && vars.size() == 0 )

代码示例来源:origin: apache/jena

if ( binding != null && binding.size() != 0 )
  qIter = QueryIterSingleton.create(binding, execCxt) ;
else

代码示例来源:origin: apache/jena

if ( b.size() == 3 )

相关文章