[libbluray-devel] org.bluray.media: add toString() to events

hpi1 git at videolan.org
Wed Apr 13 10:38:08 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Apr  7 13:25:56 2016 +0300| [fd1daf8cecc6f6a2e180ad079fe4fed6252fa8d9] | committer: hpi1

org.bluray.media: add toString() to events

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=fd1daf8cecc6f6a2e180ad079fe4fed6252fa8d9
---

 src/libbluray/bdj/java/org/bluray/media/AngleChangeEvent.java    |    6 +++++-
 src/libbluray/bdj/java/org/bluray/media/PanningChangeEvent.java  |    4 ++--
 src/libbluray/bdj/java/org/bluray/media/PiPStatusEvent.java      |    6 +++++-
 src/libbluray/bdj/java/org/bluray/media/PlaybackMarkEvent.java   |    6 +++++-
 .../bdj/java/org/bluray/media/PlaybackPlayItemEvent.java         |    5 ++++-
 src/libbluray/bdj/java/org/bluray/media/UOMaskedEvent.java       |    6 +++++-
 6 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/src/libbluray/bdj/java/org/bluray/media/AngleChangeEvent.java b/src/libbluray/bdj/java/org/bluray/media/AngleChangeEvent.java
index fdddb9c..f177e3a 100644
--- a/src/libbluray/bdj/java/org/bluray/media/AngleChangeEvent.java
+++ b/src/libbluray/bdj/java/org/bluray/media/AngleChangeEvent.java
@@ -31,6 +31,10 @@ public class AngleChangeEvent extends EventObject {
         return this.angle;
     }
 
-    private int angle;
+    public String toString() {
+        return getClass().getName() + "[source=" + source + ",angle=" + angle + "]";
+    }
+
+    private final int angle;
     private static final long serialVersionUID = -2582705865081165327L;
 }
diff --git a/src/libbluray/bdj/java/org/bluray/media/PanningChangeEvent.java b/src/libbluray/bdj/java/org/bluray/media/PanningChangeEvent.java
index bbf94fc..c0c0adb 100644
--- a/src/libbluray/bdj/java/org/bluray/media/PanningChangeEvent.java
+++ b/src/libbluray/bdj/java/org/bluray/media/PanningChangeEvent.java
@@ -37,7 +37,7 @@ public class PanningChangeEvent extends EventObject {
         return balance;
     }
 
-    private float balance;
-    private float fade;
+    private final float balance;
+    private final float fade;
     private static final long serialVersionUID = 75180748900043421L;
 }
diff --git a/src/libbluray/bdj/java/org/bluray/media/PiPStatusEvent.java b/src/libbluray/bdj/java/org/bluray/media/PiPStatusEvent.java
index 0576a56..4b9362f 100644
--- a/src/libbluray/bdj/java/org/bluray/media/PiPStatusEvent.java
+++ b/src/libbluray/bdj/java/org/bluray/media/PiPStatusEvent.java
@@ -33,6 +33,10 @@ public class PiPStatusEvent extends EventObject {
         return this.available;
     }
 
-    private boolean available;
+    public String toString() {
+        return getClass().getName() + "[source=" + source + ",available=" + available + "]";
+    }
+
+    private final boolean available;
     private static final long serialVersionUID = -1233930796504204430L;
 }
diff --git a/src/libbluray/bdj/java/org/bluray/media/PlaybackMarkEvent.java b/src/libbluray/bdj/java/org/bluray/media/PlaybackMarkEvent.java
index c178a35..53c068e 100644
--- a/src/libbluray/bdj/java/org/bluray/media/PlaybackMarkEvent.java
+++ b/src/libbluray/bdj/java/org/bluray/media/PlaybackMarkEvent.java
@@ -32,6 +32,10 @@ public class PlaybackMarkEvent extends EventObject {
         return this.mark;
     }
 
-    private int mark;
+    public String toString() {
+        return getClass().getName() + "[source=" + source + ",mark=" + mark + "]";
+    }
+
+    private final int mark;
     private static final long serialVersionUID = -6679776995045036356L;
 }
diff --git a/src/libbluray/bdj/java/org/bluray/media/PlaybackPlayItemEvent.java b/src/libbluray/bdj/java/org/bluray/media/PlaybackPlayItemEvent.java
index 9464715..1b4bc71 100644
--- a/src/libbluray/bdj/java/org/bluray/media/PlaybackPlayItemEvent.java
+++ b/src/libbluray/bdj/java/org/bluray/media/PlaybackPlayItemEvent.java
@@ -30,7 +30,10 @@ public class PlaybackPlayItemEvent extends EventObject {
     public int getPlayItem() {
         return playItem;
     }
+    public String toString() {
+        return getClass().getName() + "[source=" + source + ",playItem=" + playItem + "]";
+    }
 
-    private int playItem;
+    private final int playItem;
     private static final long serialVersionUID = -2550042660300066017L;
 }
diff --git a/src/libbluray/bdj/java/org/bluray/media/UOMaskedEvent.java b/src/libbluray/bdj/java/org/bluray/media/UOMaskedEvent.java
index 8c66f1e..2f252f2 100644
--- a/src/libbluray/bdj/java/org/bluray/media/UOMaskedEvent.java
+++ b/src/libbluray/bdj/java/org/bluray/media/UOMaskedEvent.java
@@ -31,6 +31,10 @@ public class UOMaskedEvent extends EventObject {
         return position;
     }
 
-    private int position;
+    public String toString() {
+        return getClass().getName() + "[source=" + source + ",position=" + position + "]";
+    }
+
+    private final int position;
     private static final long serialVersionUID = -1417936916531803863L;
 }



More information about the libbluray-devel mailing list