commit 4a7ded2b9c1295eda46e4b62be4ebebd00aaff6d
Author: LeszekKoltunski <leszek@koltunski.pl>
Date:   Wed Apr 16 12:12:46 2025 +0200

    Rename .java to .kt

diff --git a/src/main/java/org/distorted/library/message/EffectListener.java b/src/main/java/org/distorted/library/message/EffectListener.java
deleted file mode 100644
index 3140ba4..0000000
--- a/src/main/java/org/distorted/library/message/EffectListener.java
+++ /dev/null
@@ -1,43 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2016 Leszek Koltunski  leszek@koltunski.pl                                          //
-//                                                                                               //
-// This file is part of Distorted.                                                               //
-//                                                                                               //
-// This library is free software; you can redistribute it and/or                                 //
-// modify it under the terms of the GNU Lesser General Public                                    //
-// License as published by the Free Software Foundation; either                                  //
-// version 2.1 of the License, or (at your option) any later version.                            //
-//                                                                                               //
-// This library is distributed in the hope that it will be useful,                               //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                             //
-// Lesser General Public License for more details.                                               //
-//                                                                                               //
-// You should have received a copy of the GNU Lesser General Public                              //
-// License along with this library; if not, write to the Free Software                           //
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA                //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.library.message;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-import org.distorted.library.effect.Effect;
-
-/**
- * This interface lets users of the DistortedLibrary library get notified when a given effect finishes.
- * To receive the notifications, we first have to register with a call to {@link Effect#notifyWhenFinished(EffectListener)}.
- */
-
-public interface EffectListener 
-  {
-/**
- * Gets called when Effect 'effectID' finishes execution (i.e. the Dynamic inside it reaches its final point).
- * 
- * @param effectID ID of the finished effect, as returned by {@link org.distorted.library.effect.Effect#getID() }
- */
-   
-  void effectFinished(final long effectID);
-  }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/library/message/EffectListener.kt b/src/main/java/org/distorted/library/message/EffectListener.kt
new file mode 100644
index 0000000..3140ba4
--- /dev/null
+++ b/src/main/java/org/distorted/library/message/EffectListener.kt
@@ -0,0 +1,43 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski  leszek@koltunski.pl                                          //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// This library is free software; you can redistribute it and/or                                 //
+// modify it under the terms of the GNU Lesser General Public                                    //
+// License as published by the Free Software Foundation; either                                  //
+// version 2.1 of the License, or (at your option) any later version.                            //
+//                                                                                               //
+// This library is distributed in the hope that it will be useful,                               //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                             //
+// Lesser General Public License for more details.                                               //
+//                                                                                               //
+// You should have received a copy of the GNU Lesser General Public                              //
+// License along with this library; if not, write to the Free Software                           //
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA                //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.library.message;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+import org.distorted.library.effect.Effect;
+
+/**
+ * This interface lets users of the DistortedLibrary library get notified when a given effect finishes.
+ * To receive the notifications, we first have to register with a call to {@link Effect#notifyWhenFinished(EffectListener)}.
+ */
+
+public interface EffectListener 
+  {
+/**
+ * Gets called when Effect 'effectID' finishes execution (i.e. the Dynamic inside it reaches its final point).
+ * 
+ * @param effectID ID of the finished effect, as returned by {@link org.distorted.library.effect.Effect#getID() }
+ */
+   
+  void effectFinished(final long effectID);
+  }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/src/main/java/org/distorted/library/message/EffectMessageSender.java b/src/main/java/org/distorted/library/message/EffectMessageSender.java
deleted file mode 100644
index 0bc97fc..0000000
--- a/src/main/java/org/distorted/library/message/EffectMessageSender.java
+++ /dev/null
@@ -1,180 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////////////////////////
-// Copyright 2016 Leszek Koltunski  leszek@koltunski.pl                                          //
-//                                                                                               //
-// This file is part of Distorted.                                                               //
-//                                                                                               //
-// This library is free software; you can redistribute it and/or                                 //
-// modify it under the terms of the GNU Lesser General Public                                    //
-// License as published by the Free Software Foundation; either                                  //
-// version 2.1 of the License, or (at your option) any later version.                            //
-//                                                                                               //
-// This library is distributed in the hope that it will be useful,                               //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                             //
-// Lesser General Public License for more details.                                               //
-//                                                                                               //
-// You should have received a copy of the GNU Lesser General Public                              //
-// License along with this library; if not, write to the Free Software                           //
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA                //
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-package org.distorted.library.message;
-
-import org.distorted.library.effect.Effect;
-
-import java.util.Vector;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-/**
- * Not part of public API, do not document (public only because has to be used in Meshes)
- *
- * @y.exclude
- */
-public final class EffectMessageSender extends Thread
-  {
-  private static class Message
-    {
-    EffectListener mListener;
-    long mEffectID;
-
-    Message(EffectListener listener, long effectID)
-      {
-      mListener = listener;
-      mEffectID = effectID;
-      }
-    }
-
-  private static final Object mLock        = new Object();
-  private static Vector<Message> mList     = null;
-  private static EffectMessageSender mThis = null;
-  private static volatile boolean mNotify  = false;
-
-  // debug only, to be removed later
-  private static int mNumStarts = 0;
-  private static long mStartTime, mStopTime;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-   
-  private EffectMessageSender() 
-    {
-
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static void startSending()
-    {
-    synchronized(mLock)
-      {
-      if( mThis==null )
-        {
-        mStartTime = System.currentTimeMillis();
-        mNumStarts++;
-
-        mList = new Vector<>();
-        mThis = new EffectMessageSender();
-        mThis.start();
-        }
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-  
-  public static void stopSending()
-    {
-    synchronized(mLock)
-      {
-      if( mThis!=null )
-        {
-        mStopTime = System.currentTimeMillis();
-        mNumStarts--;
-
-        mThis=null;
-        mLock.notify();
-        }
-      }
-    }
-  
-///////////////////////////////////////////////////////////////////////////////////////////////////
-  
-  public void run()
-    {
-    Message tmp;  
-     
-    while(mThis!=null)
-      {
-      while( !mList.isEmpty() )
-        {
-        tmp = mList.remove(0);
-        tmp.mListener.effectFinished(tmp.mEffectID);
-        }
-
-      synchronized(mLock)
-        {
-        if (!mNotify)
-          {
-          try  { mLock.wait(); }
-          catch(InterruptedException ignored) { }
-          }
-        mNotify = false;
-        }
-      }
-
-    mList.clear();
-    }
-  
-///////////////////////////////////////////////////////////////////////////////////////////////////
-        
-  public static void newMessage(Effect effect)
-    {
-    int numListeners = effect.getNumListeners();
-
-    if( numListeners>0 )
-      {
-      long id = effect.getID();
-
-      for(int i=0; i<numListeners; i++)
-        {
-        EffectListener listener = effect.removeFirstListener();
-        Message msg = new Message(listener,id);
-        mList.add(msg);
-        }
-
-      synchronized(mLock)
-        {
-        mNotify = true;
-        mLock.notify();
-        }
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static boolean isRunning()
-    {
-    return mThis!=null;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static void restartThread()
-    {
-    synchronized(mLock)
-      {
-      if( mThis==null )
-        {
-        if( mList==null ) mList = new Vector<>();
-        mThis = new EffectMessageSender();
-        mThis.start();
-        }
-      }
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public static String reportState()
-    {
-    return "running "+(mThis!=null)+" notify="+mNotify+" elements="+mList.size()+
-           " start="+mStartTime+" stop="+mStopTime+" numStarts="+mNumStarts;
-    }
-  }
diff --git a/src/main/java/org/distorted/library/message/EffectMessageSender.kt b/src/main/java/org/distorted/library/message/EffectMessageSender.kt
new file mode 100644
index 0000000..0bc97fc
--- /dev/null
+++ b/src/main/java/org/distorted/library/message/EffectMessageSender.kt
@@ -0,0 +1,180 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////
+// Copyright 2016 Leszek Koltunski  leszek@koltunski.pl                                          //
+//                                                                                               //
+// This file is part of Distorted.                                                               //
+//                                                                                               //
+// This library is free software; you can redistribute it and/or                                 //
+// modify it under the terms of the GNU Lesser General Public                                    //
+// License as published by the Free Software Foundation; either                                  //
+// version 2.1 of the License, or (at your option) any later version.                            //
+//                                                                                               //
+// This library is distributed in the hope that it will be useful,                               //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of                                //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                             //
+// Lesser General Public License for more details.                                               //
+//                                                                                               //
+// You should have received a copy of the GNU Lesser General Public                              //
+// License along with this library; if not, write to the Free Software                           //
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA                //
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+package org.distorted.library.message;
+
+import org.distorted.library.effect.Effect;
+
+import java.util.Vector;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+/**
+ * Not part of public API, do not document (public only because has to be used in Meshes)
+ *
+ * @y.exclude
+ */
+public final class EffectMessageSender extends Thread
+  {
+  private static class Message
+    {
+    EffectListener mListener;
+    long mEffectID;
+
+    Message(EffectListener listener, long effectID)
+      {
+      mListener = listener;
+      mEffectID = effectID;
+      }
+    }
+
+  private static final Object mLock        = new Object();
+  private static Vector<Message> mList     = null;
+  private static EffectMessageSender mThis = null;
+  private static volatile boolean mNotify  = false;
+
+  // debug only, to be removed later
+  private static int mNumStarts = 0;
+  private static long mStartTime, mStopTime;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+   
+  private EffectMessageSender() 
+    {
+
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public static void startSending()
+    {
+    synchronized(mLock)
+      {
+      if( mThis==null )
+        {
+        mStartTime = System.currentTimeMillis();
+        mNumStarts++;
+
+        mList = new Vector<>();
+        mThis = new EffectMessageSender();
+        mThis.start();
+        }
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  public static void stopSending()
+    {
+    synchronized(mLock)
+      {
+      if( mThis!=null )
+        {
+        mStopTime = System.currentTimeMillis();
+        mNumStarts--;
+
+        mThis=null;
+        mLock.notify();
+        }
+      }
+    }
+  
+///////////////////////////////////////////////////////////////////////////////////////////////////
+  
+  public void run()
+    {
+    Message tmp;  
+     
+    while(mThis!=null)
+      {
+      while( !mList.isEmpty() )
+        {
+        tmp = mList.remove(0);
+        tmp.mListener.effectFinished(tmp.mEffectID);
+        }
+
+      synchronized(mLock)
+        {
+        if (!mNotify)
+          {
+          try  { mLock.wait(); }
+          catch(InterruptedException ignored) { }
+          }
+        mNotify = false;
+        }
+      }
+
+    mList.clear();
+    }
+  
+///////////////////////////////////////////////////////////////////////////////////////////////////
+        
+  public static void newMessage(Effect effect)
+    {
+    int numListeners = effect.getNumListeners();
+
+    if( numListeners>0 )
+      {
+      long id = effect.getID();
+
+      for(int i=0; i<numListeners; i++)
+        {
+        EffectListener listener = effect.removeFirstListener();
+        Message msg = new Message(listener,id);
+        mList.add(msg);
+        }
+
+      synchronized(mLock)
+        {
+        mNotify = true;
+        mLock.notify();
+        }
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public static boolean isRunning()
+    {
+    return mThis!=null;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public static void restartThread()
+    {
+    synchronized(mLock)
+      {
+      if( mThis==null )
+        {
+        if( mList==null ) mList = new Vector<>();
+        mThis = new EffectMessageSender();
+        mThis.start();
+        }
+      }
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public static String reportState()
+    {
+    return "running "+(mThis!=null)+" notify="+mNotify+" elements="+mList.size()+
+           " start="+mStartTime+" stop="+mStopTime+" numStarts="+mNumStarts;
+    }
+  }
