@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_LESS || r == Expr.CMP_EQUAL ) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { // Note: notSameValueAs means "known to be different" // sameValueAs means "know to be the same value" // so they are not opposites boolean b = NodeValue.notSameAs(x, y) ; return NodeValue.booleanReturn(b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_LESS ) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { // Note: notSameValueAs means "known to be different" // sameValueAs means "know to be the same value" // so they are not opposites boolean b = NodeValue.notSameAs(x, y) ; return NodeValue.booleanReturn(b) ; }
public static NodeValue not(NodeValue nv) // F&O fn:not { boolean b = XSDFuncOp.booleanEffectiveValue(nv) ; return NodeValue.booleanReturn(!b) ; }
@Override public NodeValue evalSpecial(Binding binding, FunctionEnv env) { boolean b = super.evalNotOneOf(binding, env) ; return NodeValue.booleanReturn(b) ; }
@Override public NodeValue evalSpecial(Binding binding, FunctionEnv env) { boolean b = super.evalNotOneOf(binding, env) ; return NodeValue.booleanReturn(b) ; }
public static NodeValue not(NodeValue nv) // F&O fn:not { boolean b = XSDFuncOp.booleanEffectiveValue(nv) ; return NodeValue.booleanReturn(!b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_LESS ) ; }
@Override protected NodeValue eval(Binding binding, QueryIterator qIter, FunctionEnv env) { boolean b = qIter.hasNext() ; return NodeValue.booleanReturn(b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_GREATER ) ; }
@Override public NodeValue evalSpecial(Binding binding, FunctionEnv env) { boolean b = super.evalOneOf(binding, env) ; return NodeValue.booleanReturn(b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { int r = NodeValue.compare(x, y) ; return NodeValue.booleanReturn( r == Expr.CMP_GREATER ) ; }
@Override protected NodeValue eval(Binding binding, QueryIterator qIter, FunctionEnv env) { boolean b = qIter.hasNext() ; return NodeValue.booleanReturn(b) ; }
@Override public NodeValue eval(NodeValue x, NodeValue y) { // Note: notSameValueAs means "known to be different" // sameValueAs means "know to be the same value" // so they are not opposites boolean b = NodeValue.sameAs(x, y) ; return NodeValue.booleanReturn(b) ; }
public static NodeValue booleanEffectiveValueAsNodeValue(NodeValue nv) // F&O fn:boolean { if ( nv.isBoolean() ) // "Optimization" (saves on object churn) return nv ; return NodeValue.booleanReturn(booleanEffectiveValue(nv)) ; }
public static NodeValue booleanEffectiveValueAsNodeValue(NodeValue nv) // F&O fn:boolean { if ( nv.isBoolean() ) // "Optimization" (saves on object churn) return nv ; return NodeValue.booleanReturn(booleanEffectiveValue(nv)) ; }
public static NodeValue strEndsWith(NodeValue string, NodeValue match) { check2("strEnds", string, match) ; String lex1 = string.asNode().getLiteralLexicalForm() ; String lex2 = match.asNode().getLiteralLexicalForm() ; return NodeValue.booleanReturn(lex1.endsWith(lex2)) ; }
public static NodeValue strStartsWith(NodeValue string, NodeValue match) { check2("strStarts", string, match) ; String lex1 = string.asNode().getLiteralLexicalForm() ; String lex2 = match.asNode().getLiteralLexicalForm() ; return NodeValue.booleanReturn(lex1.startsWith(lex2)) ; }
public static NodeValue strContains(NodeValue string, NodeValue match) { check2("contains", string, match) ; String lex1 = string.asNode().getLiteralLexicalForm() ; String lex2 = match.asNode().getLiteralLexicalForm() ; boolean x = StrUtils.contains(lex1, lex2) ; return NodeValue.booleanReturn(x) ; }