~ubuntu-branches/ubuntu/utopic/jing-trang/utopic

« back to all changes in this revision

Viewing changes to mod/pattern/src/main/com/thaiopensource/relaxng/pattern/ErrorPattern.java

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Thibault
  • Date: 2009-09-01 15:53:03 UTC
  • Revision ID: james.westby@ubuntu.com-20090901155303-2kweef05h5v9j3ni
Tags: upstream-20090818
ImportĀ upstreamĀ versionĀ 20090818

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package com.thaiopensource.relaxng.pattern;
 
2
 
 
3
class ErrorPattern extends Pattern {
 
4
  ErrorPattern() {
 
5
    super(false, EMPTY_CONTENT_TYPE, ERROR_HASH_CODE);
 
6
  }
 
7
  boolean samePattern(Pattern other) {
 
8
    return other instanceof ErrorPattern;
 
9
  }
 
10
 
 
11
  <T> T apply(PatternFunction<T> f) {
 
12
    return f.caseError(this);
 
13
  }
 
14
}