summaryrefslogtreecommitdiff
path: root/plugins/structuralsearch/source/com/intellij/tokenindex/AnonymToken.java
blob: c364ccc3f9c5143c1767b0219302ce44e1004bcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.intellij.tokenindex;

/**
 * @author Eugene.Kudelevsky
 */
public class AnonymToken extends Token {
  private final byte myType;

  public AnonymToken(byte type, int start, int end) {
    super(start, end);
    myType = type;
  }

  public byte getType() {
    return myType;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    AnonymToken that = (AnonymToken)o;

    if (myType != that.myType) return false;

    return true;
  }

  @Override
  public int hashCode() {
    return myType;
  }
}