| 1 |
package com.thaiopensource.relaxng.output.xsd.basic; |
| 2 |
|
| 3 |
import com.thaiopensource.relaxng.edit.SourceLocation; |
| 4 |
|
| 5 |
public class WildcardElement extends Particle { |
| 6 |
private final Wildcard wildcard; |
| 7 |
|
| 8 |
public WildcardElement(SourceLocation location, Annotation annotation, Wildcard wildcard) { |
| 9 |
super(location, annotation); |
| 10 |
this.wildcard = wildcard; |
| 11 |
} |
| 12 |
|
| 13 |
public Wildcard getWildcard() { |
| 14 |
return wildcard; |
| 15 |
} |
| 16 |
|
| 17 |
public boolean equals(Object obj) { |
| 18 |
return super.equals(obj) && ((WildcardElement)obj).wildcard.equals(wildcard); |
| 19 |
} |
| 20 |
|
| 21 |
public int hashCode() { |
| 22 |
return super.hashCode() ^ wildcard.hashCode(); |
| 23 |
} |
| 24 |
|
| 25 |
public <T> T accept(ParticleVisitor<T> visitor) { |
| 26 |
return visitor.visitWildcardElement(this); |
| 27 |
} |
| 28 |
} |