mina-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhe...@apache.org
Subject svn commit: r545833 - /mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java
Date Sun, 10 Jun 2007 03:00:15 GMT
Author: mheath
Date: Sat Jun  9 20:00:15 2007
New Revision: 545833

URL: http://svn.apache.org/viewvc?view=rev&rev=545833
Log:
Added support for invocation chaining on putEnumSet methods

Modified:
    mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java

Modified: mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java
URL: http://svn.apache.org/viewvc/mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java?view=diff&rev=545833&r1=545832&r2=545833
==============================================================================
--- mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java (original)
+++ mina/trunk/core/src/main/java/org/apache/mina/common/ByteBuffer.java Sat Jun  9 20:00:15
2007
@@ -2008,8 +2008,9 @@
      * @param <E> the enum type of the EnumSet
      * @param set  the enum set to write to the buffer
      */
-    public <E extends Enum<E>> void putEnumSet(EnumSet<E> set) {
+    public <E extends Enum<E>> ByteBuffer putEnumSet(EnumSet<E> set) {
         put((byte) toLong(set));
+        return this;
     }
 
     /**
@@ -2018,8 +2019,9 @@
      * @param <E> the enum type of the EnumSet
      * @param set  the enum set to write to the buffer
      */
-    public <E extends Enum<E>> void putEnumSetShort(EnumSet<E> set) {
+    public <E extends Enum<E>> ByteBuffer putEnumSetShort(EnumSet<E> set)
{
         putShort((short) toLong(set));
+        return this;
     }
 
     /**
@@ -2028,8 +2030,9 @@
      * @param <E> the enum type of the EnumSet
      * @param set  the enum set to write to the buffer
      */
-    public <E extends Enum<E>> void putEnumSetInt(EnumSet<E> set) {
+    public <E extends Enum<E>> ByteBuffer putEnumSetInt(EnumSet<E> set)
{
         putInt((int) toLong(set));
+        return this;
     }
 
     /**
@@ -2038,8 +2041,9 @@
      * @param <E> the enum type of the EnumSet
      * @param set  the enum set to write to the buffer
      */
-    public <E extends Enum<E>> void putEnumSetLong(EnumSet<E> set) {
+    public <E extends Enum<E>> ByteBuffer putEnumSetLong(EnumSet<E> set)
{
         putLong(toLong(set));
+        return this;
     }
 
     /**



Mime
View raw message