net.sf.saxon.om.Item.effectiveBooleanValue()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(81)

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

Item.effectiveBooleanValue介绍

暂无

代码示例

代码示例来源:origin: net.sf.saxon/Saxon-HE

/**
 * Get the effective boolean value
 */
public boolean effectiveBooleanValue() throws XPathException {
  int len = getLength();
  if (len == 0) {
    return false;
  } else {
    Item first = value.get(0);
    if (first instanceof NodeInfo) {
      return true;
    } else if (len == 1 && first instanceof AtomicValue) {
      return first.effectiveBooleanValue();
    } else {
      // this will fail - reuse the error messages
      return ExpressionTool.effectiveBooleanValue(iterate());
    }
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon

/**
 * Get the effective boolean value
 */
public boolean effectiveBooleanValue() throws XPathException {
  int len = getLength();
  if (len == 0) {
    return false;
  } else {
    Item first = value.get(0);
    if (first instanceof NodeInfo) {
      return true;
    } else if (len == 1 && first instanceof AtomicValue) {
      return first.effectiveBooleanValue();
    } else {
      // this will fail - reuse the error messages
      return ExpressionTool.effectiveBooleanValue(iterate());
    }
  }
}

相关文章