File: VariantBase.java

package info (click to toggle)
lib-xt-java 0.19990725-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,224 kB
  • ctags: 2,133
  • sloc: java: 9,665; makefile: 54; xml: 28
file content (21 lines) | stat: -rw-r--r-- 723 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package com.jclark.xsl.expr;

import com.jclark.xsl.om.*;

public abstract class VariantBase implements Variant {
  public Variant makePermanent() { return this; }
  public NodeIterator convertToNodeSet() throws XSLException {
    throw new XSLException("cannot convert to node-set");
  }
  public double convertToNumber() throws XSLException {
    return Converter.toNumber(convertToString());
  }
  public boolean convertToPredicate(ExprContext context) throws XSLException {
    return convertToBoolean();
  }
  public boolean isBoolean() { return false; }
  public boolean isNumber() { return false; }
  public boolean isString() { return false; }
  public boolean isNodeSet() { return false; }
}