summaryrefslogtreecommitdiff
path: root/platform/structuralsearch/source/com/intellij/tokenindex/AnonymToken.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/structuralsearch/source/com/intellij/tokenindex/AnonymToken.java')
-rw-r--r--platform/structuralsearch/source/com/intellij/tokenindex/AnonymToken.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/platform/structuralsearch/source/com/intellij/tokenindex/AnonymToken.java b/platform/structuralsearch/source/com/intellij/tokenindex/AnonymToken.java
new file mode 100644
index 000000000000..c364ccc3f9c5
--- /dev/null
+++ b/platform/structuralsearch/source/com/intellij/tokenindex/AnonymToken.java
@@ -0,0 +1,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;
+ }
+}