Debian Codegraph @

mod/convert-to-xsd/src/main/com/thaiopensource/relaxng/output/xsd/basic/AttributeGroup.java

raw
1 package com.thaiopensource.relaxng.output.xsd.basic;
2
3 import com.thaiopensource.relaxng.edit.SourceLocation;
4
5 import java.util.List;
6 import java.util.Collections;
7
8 public class AttributeGroup extends AttributeUse {
9 private final List<AttributeUse> children;
10 private static final List<AttributeUse> EMPTY_LIST = Collections.emptyList();
11
12 public static final AttributeGroup EMPTY = new AttributeGroup(null, null, EMPTY_LIST);
13
14 public AttributeGroup(SourceLocation location, Annotation annotation, List<AttributeUse> children) {
15 super(location, annotation);
16 this.children = Collections.unmodifiableList(children);
17 }
18
19 public List<AttributeUse> getChildren() {
20 return children;
21 }
22
23 public boolean equals(Object obj) {
24 return super.equals(obj) && ((AttributeGroup)obj).children.equals(children);
25 }
26
27 public int hashCode() {
28 return super.hashCode() ^ children.hashCode();
29 }
30
31 public <T> T accept(AttributeUseVisitor<T> visitor) {
32 return visitor.visitAttributeGroup(this);
33 }
34 }