Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.hp.hpl.jena.graph.query
Class Dyadic

    java.lang.Object
      com.hp.hpl.jena.graph.query.Expression.Base
          com.hp.hpl.jena.graph.query.Expression.Application
              com.hp.hpl.jena.graph.query.Dyadic

All Implemented Interfaces:
  Expression

Direct Known Subclasses:
  Rewrite.DyadicLiteral

    public abstract class Dyadic

extends Expression.Application

A base class for dyadic expressions with a built-in Valuator; subclasses must define an evalObject or evalBool method which will be supplied with the evaluated operands.

Author:
  kers

Nested Class Summary

Nested classes/interfaces inherited from interface com.hp.hpl.jena.graph.query.Expression
`Expression.Application, Expression.Base, Expression.BoolConstant, Expression.Constant, Expression.Fixed, Expression.Util, Expression.Valof, Expression.Variable`

Field Summary

Fields inherited from interface com.hp.hpl.jena.graph.query.Expression
`FALSE, TRUE`

Constructor Summary
`Dyadic(Expression L, java.lang.String F, Expression R)`

Method Summary
`static Expression` | `and(Expression L, Expression R)`
`int` | `argCount()` If this Expression is an application, answer the number of arguments that it has.
`boolean` | `evalBool(java.lang.Object l, java.lang.Object r)` Answer the boolean result of evaluating this dyadic expression with the given arguments `l` and `r`.
`java.lang.Object` | `evalObject(java.lang.Object l, java.lang.Object r)` Answer the Object result of evaluating this dyadic expression with the given arguments `l` and `r`.
`Expression` | `getArg(int i)` If this Expression is an application, and 0 <= i < argCount(), answer the `i`th argument.
`java.lang.String` | `getFun()` If this Expression is an application, return the string identifying the function, which should be a URI.
`Valuator` | `prepare(VariableIndexes vi)` Answer a Valuator which, when run with a set of index-to-value bindings, evaluates this expression in the light of the given variable-to-index bindings [ie as though the variables were bound to the corresponding values]
`java.lang.String` | `toString()`

Methods inherited from class com.hp.hpl.jena.graph.query.Expression.Application
`isApply`

Methods inherited from class com.hp.hpl.jena.graph.query.Expression.Base
`equals, getName, getValue, isConstant, isVariable`

Methods inherited from class java.lang.Object
`getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Dyadic

    public Dyadic(Expression L,
                  java.lang.String F,
                  Expression R)

Method Detail

### argCount

    public int argCount()

  Description copied from interface: `Expression`
  If this Expression is an application, answer the number of arguments that it has. Otherwise the behaviour is unspecified.

  Specified by:
    `argCount` in interface `Expression`
  Specified by:
    `argCount` in class `Expression.Application`

### getArg

    public Expression getArg(int i)

  Description copied from interface: `Expression`
  If this Expression is an application, and 0 <= i < argCount(), answer the `i`th argument. Otherwise the behaviour is unspecified.

  Specified by:
    `getArg` in interface `Expression`
  Specified by:
    `getArg` in class `Expression.Application`

### getFun

    public java.lang.String getFun()

  Description copied from interface: `Expression`
  If this Expression is an application, return the string identifying the function, which should be a URI. Otherwise the behaviour is unspecified.

  Specified by:
    `getFun` in interface `Expression`
  Specified by:
    `getFun` in class `Expression.Application`

### evalObject

    public java.lang.Object evalObject(java.lang.Object l,
                                       java.lang.Object r)

  Answer the Object result of evaluating this dyadic expression with the given arguments `l` and `r`. Either this method or `evalBool` must be over-ridden in concrete sub-classes.

### evalBool

    public boolean evalBool(java.lang.Object l,
                            java.lang.Object r)

  Answer the boolean result of evaluating this dyadic expression with the given arguments `l` and `r`. Either this method or `evalObject` must be over-ridden in concrete sub-classes.

### prepare

    public Valuator prepare(VariableIndexes vi)

  Description copied from interface: `Expression`
  Answer a Valuator which, when run with a set of index-to-value bindings, evaluates this expression in the light of the given variable-to-index bindings [ie as though the variables were bound to the corresponding values]

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### and

    public static Expression and(Expression L,
                                 Expression R)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP