package org.jetbrains.debugger;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public final class ScriptRegExpBreakpointTarget extends BreakpointTarget {
  private final String regExp;
  public final String language;

  public ScriptRegExpBreakpointTarget(@NotNull String regExp, @Nullable String language) {
    this.regExp = regExp;
    this.language = language;
  }

  @Override
  public <R> R accept(Visitor<R> visitor) {
    if (visitor instanceof ScriptRegExpSupportVisitor) {
      return ((ScriptRegExpSupportVisitor<R>)visitor).visitRegExp(this);
    }
    else {
      return visitor.visitUnknown(this);
    }
  }

  @Override
  public String toString() {
    return regExp;
  }

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

  @Override
  public int hashCode() {
    return regExp.hashCode();
  }
}
@@ -27,224 +27,76 @@
 gger
-;
 %0A%0A
-import org.jetbrains.annotations.NotNull;%0Aimport org.jetbrains.annotations.Nullable;%0A%0Apublic final class ScriptRegExpBreakpointTarget extends BreakpointTarget %7B%0A  private final String regExp;%0A  public final
+class ScriptRegExpBreakpointTarget(private val regExp:
  String
+, val
  lan
@@ -104,197 +104,75 @@
 uage
-;%0A%0A  public ScriptRegExpBreakpointTarget(@NotNull String regExp, @Nullable String language) %7B%0A    this.regExp = regExp;%0A    this.language = language;%0A  %7D%0A%0A  @Override%0A  public
+: String? = null) : BreakpointTarget() %7B%0A  override fun
  %3CR%3E
- R
  accept(
 Visi
@@ -171,27 +171,48 @@
 ept(
-V
+v
 isitor
-%3CR%3E visitor)
+: BreakpointTarget.Visitor%3CR%3E): R
  %7B%0A 
@@ -231,17 +231,9 @@
 or i
-nstanceof
+s
  Scr
@@ -255,16 +255,19 @@
 tVisitor
+%3C*%3E
 ) %7B%0A    
@@ -276,17 +276,27 @@
 return (
-(
+visitor as 
 ScriptRe
@@ -321,16 +321,8 @@
 %3CR%3E)
-visitor)
 .vis
@@ -331,25 +331,24 @@
 RegExp(this)
-;
 %0A    %7D%0A    e
@@ -392,17 +392,16 @@
 wn(this)
-;
 %0A    %7D%0A 
@@ -410,116 +410,85 @@
 %0A%0A  
-@O
+o
 verride
-%0A  public String toString() %7B%0A    return
+ fun toString() =
  regExp
-;%0A  %7D
 %0A%0A  
-@O
+o
 verride
-%0A  public boolean equals(Object o)
+ fun equals(other: Any?): Boolean
  %7B%0A 
@@ -501,18 +501,23 @@
 (this ==
+=
  o
+ther
 ) %7B%0A    
@@ -529,17 +529,16 @@
 urn true
-;
 %0A    %7D%0A 
@@ -545,16 +545,20 @@
    if (o
+ther
  == null
@@ -565,34 +565,36 @@
  %7C%7C 
-get
+java
 Class
-()
  != o
-.get
+ther.java
 Class
-()
 ) %7B%0A
@@ -611,17 +611,16 @@
 rn false
-;
 %0A    %7D%0A 
@@ -639,18 +639,22 @@
 gExp
-.equals(((
+ == (other as 
 Scri
@@ -682,27 +682,23 @@
 get)
-o)
 .regExp
-);
 %0A  %7D%0A%0A  
 @Ove
@@ -697,54 +697,33 @@
 %0A%0A  
-@O
+o
 verride
-%0A  public int hashCode() %7B%0A    return
+ fun hashCode() =
  reg
@@ -740,11 +740,6 @@
 de()
-;%0A  %7D
 %0A%7D

convert ScriptRegExpBreakpointTarget to kotlin