introduce Event.ID enum
diff --git a/src/main/java/org/yaml/snakeyaml/events/AliasEvent.java b/src/main/java/org/yaml/snakeyaml/events/AliasEvent.java
index 7b3f6ce..6ecbf55 100644
--- a/src/main/java/org/yaml/snakeyaml/events/AliasEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/AliasEvent.java
@@ -24,4 +24,9 @@
     public AliasEvent(String anchor, Mark startMark, Mark endMark) {
         super(anchor, startMark, endMark);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.Alias == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/CollectionEndEvent.java b/src/main/java/org/yaml/snakeyaml/events/CollectionEndEvent.java
index e4d5462..0512f7b 100644
--- a/src/main/java/org/yaml/snakeyaml/events/CollectionEndEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/CollectionEndEvent.java
@@ -25,4 +25,9 @@
     public CollectionEndEvent(Mark startMark, Mark endMark) {
         super(startMark, endMark);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.CollectionEnd == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/CollectionStartEvent.java b/src/main/java/org/yaml/snakeyaml/events/CollectionStartEvent.java
index 623e3dc..9d4afc9 100644
--- a/src/main/java/org/yaml/snakeyaml/events/CollectionStartEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/CollectionStartEvent.java
@@ -70,4 +70,9 @@
     protected String getArguments() {
         return super.getArguments() + ", tag=" + tag + ", implicit=" + implicit;
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.CollectionStart == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/DocumentEndEvent.java b/src/main/java/org/yaml/snakeyaml/events/DocumentEndEvent.java
index e9cbea9..de6a355 100644
--- a/src/main/java/org/yaml/snakeyaml/events/DocumentEndEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/DocumentEndEvent.java
@@ -34,4 +34,9 @@
     public boolean getExplicit() {
         return explicit;
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.DocumentEnd == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/DocumentStartEvent.java b/src/main/java/org/yaml/snakeyaml/events/DocumentStartEvent.java
index 2af1862..6f378fb 100644
--- a/src/main/java/org/yaml/snakeyaml/events/DocumentStartEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/DocumentStartEvent.java
@@ -63,4 +63,9 @@
     public Map<String, String> getTags() {
         return tags;
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.DocumentStar == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/Event.java b/src/main/java/org/yaml/snakeyaml/events/Event.java
index dce71ca..22e7f5c 100644
--- a/src/main/java/org/yaml/snakeyaml/events/Event.java
+++ b/src/main/java/org/yaml/snakeyaml/events/Event.java
@@ -22,6 +22,10 @@
  * of a {@link org.yaml.snakeyaml.emitter.Emitter}.
  */
 public abstract class Event {
+    public enum ID {
+        Alias, CollectionEnd, CollectionStart, DocumentEnd, DocumentStar, MappingEnd, MappingStart, Node, Scalar, SequenceEnd, SequenceStart, StreamEnd, StreamStart
+    }
+
     private final Mark startMark;
     private final Mark endMark;
 
@@ -49,6 +53,8 @@
         return "";
     }
 
+    public abstract boolean is(ID id);
+
     /*
      * for tests only
      */
diff --git a/src/main/java/org/yaml/snakeyaml/events/MappingEndEvent.java b/src/main/java/org/yaml/snakeyaml/events/MappingEndEvent.java
index 1e26fdd..7d0974c 100644
--- a/src/main/java/org/yaml/snakeyaml/events/MappingEndEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/MappingEndEvent.java
@@ -27,4 +27,9 @@
     public MappingEndEvent(Mark startMark, Mark endMark) {
         super(startMark, endMark);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.MappingEnd == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/MappingStartEvent.java b/src/main/java/org/yaml/snakeyaml/events/MappingStartEvent.java
index 09c4211..2e037b2 100644
--- a/src/main/java/org/yaml/snakeyaml/events/MappingStartEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/MappingStartEvent.java
@@ -36,4 +36,9 @@
             Mark endMark, Boolean flowStyle) {
         super(anchor, tag, implicit, startMark, endMark, flowStyle);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.MappingStart == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/NodeEvent.java b/src/main/java/org/yaml/snakeyaml/events/NodeEvent.java
index 8435bd2..a25f99f 100644
--- a/src/main/java/org/yaml/snakeyaml/events/NodeEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/NodeEvent.java
@@ -46,4 +46,9 @@
     protected String getArguments() {
         return "anchor=" + anchor;
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.Node == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/ScalarEvent.java b/src/main/java/org/yaml/snakeyaml/events/ScalarEvent.java
index 8cc8ec2..af30f12 100644
--- a/src/main/java/org/yaml/snakeyaml/events/ScalarEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/ScalarEvent.java
@@ -92,4 +92,9 @@
     protected String getArguments() {
         return super.getArguments() + ", tag=" + tag + ", " + implicit + ", value=" + value;
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.Scalar == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/SequenceEndEvent.java b/src/main/java/org/yaml/snakeyaml/events/SequenceEndEvent.java
index 2d480db..0c1c0de 100644
--- a/src/main/java/org/yaml/snakeyaml/events/SequenceEndEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/SequenceEndEvent.java
@@ -27,4 +27,9 @@
     public SequenceEndEvent(Mark startMark, Mark endMark) {
         super(startMark, endMark);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.SequenceEnd == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/SequenceStartEvent.java b/src/main/java/org/yaml/snakeyaml/events/SequenceStartEvent.java
index e5af745..acee6d0 100644
--- a/src/main/java/org/yaml/snakeyaml/events/SequenceStartEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/SequenceStartEvent.java
@@ -31,4 +31,9 @@
             Mark endMark, Boolean flowStyle) {
         super(anchor, tag, implicit, startMark, endMark, flowStyle);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.SequenceStart == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/StreamEndEvent.java b/src/main/java/org/yaml/snakeyaml/events/StreamEndEvent.java
index a43a7c2..8ec6176 100644
--- a/src/main/java/org/yaml/snakeyaml/events/StreamEndEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/StreamEndEvent.java
@@ -32,4 +32,9 @@
     public StreamEndEvent(Mark startMark, Mark endMark) {
         super(startMark, endMark);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.StreamEnd == id;
+    }
 }
diff --git a/src/main/java/org/yaml/snakeyaml/events/StreamStartEvent.java b/src/main/java/org/yaml/snakeyaml/events/StreamStartEvent.java
index ada9786..a642f37 100644
--- a/src/main/java/org/yaml/snakeyaml/events/StreamStartEvent.java
+++ b/src/main/java/org/yaml/snakeyaml/events/StreamStartEvent.java
@@ -33,4 +33,9 @@
     public StreamStartEvent(Mark startMark, Mark endMark) {
         super(startMark, endMark);
     }
+
+    @Override
+    public boolean is(ID id) {
+        return ID.StreamStart == id;
+    }
 }