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

« back to all changes in this revision

Viewing changes to mod/convert-to-xsd/src/main/com/thaiopensource/relaxng/output/xsd/basic/ParticleRepeat.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.xsd.basic;
 
2
 
 
3
import com.thaiopensource.relaxng.edit.SourceLocation;
 
4
 
 
5
public class ParticleRepeat extends Particle {
 
6
  private final Particle child;
 
7
  private final Occurs occurs;
 
8
 
 
9
  public ParticleRepeat(SourceLocation location, Annotation annotation, Particle child, Occurs occurs) {
 
10
    super(location, annotation);
 
11
    this.child = child;
 
12
    this.occurs = occurs;
 
13
  }
 
14
 
 
15
  public Particle getChild() {
 
16
    return child;
 
17
  }
 
18
 
 
19
  public Occurs getOccurs() {
 
20
    return occurs;
 
21
  }
 
22
 
 
23
  public <T> T accept(ParticleVisitor<T> visitor) {
 
24
    return visitor.visitRepeat(this);
 
25
  }
 
26
 
 
27
  public boolean equals(Object obj) {
 
28
    if (!super.equals(obj))
 
29
      return false;
 
30
    ParticleRepeat other = (ParticleRepeat)obj;
 
31
    return this.child.equals(other.child) && this.occurs.equals(other.occurs);
 
32
  }
 
33
 
 
34
  public int hashCode() {
 
35
    return super.hashCode() ^ child.hashCode() ^ occurs.hashCode();
 
36
  }
 
37
}