~ubuntu-branches/debian/wheezy/jing-trang/wheezy

« back to all changes in this revision

Viewing changes to mod/convert-to-dtd/src/main/com/thaiopensource/relaxng/output/dtd/AttributeType.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.output.dtd;
 
2
 
 
3
class AttributeType {
 
4
  private AttributeType() { }
 
5
  static final AttributeType EMPTY = new AttributeType();
 
6
  static final AttributeType SINGLE = new AttributeType();
 
7
  static final AttributeType MULTI = new AttributeType();
 
8
 
 
9
  static AttributeType group(AttributeType at1, AttributeType at2) {
 
10
    if (at1 == EMPTY)
 
11
      return at2;
 
12
    if (at2 == EMPTY)
 
13
      return at1;
 
14
    return MULTI;
 
15
  }
 
16
}