activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1308212 - /activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala
Date Sun, 01 Apr 2012 23:02:42 GMT
Author: chirino
Date: Sun Apr  1 23:02:42 2012
New Revision: 1308212

URL: http://svn.apache.org/viewvc?rev=1308212&view=rev
Log:
Rename the OptionSupport methods to apply so that it's easier to use without having to import
it's methods.

Modified:
    activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala

Modified: activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala?rev=1308212&r1=1308211&r2=1308212&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-util/src/main/scala/org/apache/activemq/apollo/util/OptionSupport.scala
Sun Apr  1 23:02:42 2012
@@ -25,42 +25,42 @@ import java.{lang=>jl}
  */
 object OptionSupport {
 
-  implicit def boxed_boolean_to_option(value:jl.Boolean):Option[Boolean] = value match {
+  implicit def apply(value:jl.Boolean):Option[Boolean] = value match {
     case null => None
     case x => Some(x.booleanValue)
   }
 
-  implicit def boxed_character_to_option(value:jl.Character):Option[Char] = value match {
+  implicit def apply(value:jl.Character):Option[Char] = value match {
     case null => None
     case x => Some(x.charValue)
   }
 
-  implicit def boxed_short_to_option(value:jl.Short):Option[Short] = value match {
+  implicit def apply(value:jl.Short):Option[Short] = value match {
     case null => None
     case x => Some(x.shortValue)
   }
 
-  implicit def boxed_integer_to_option(value:jl.Integer):Option[Int] = value match {
+  implicit def apply(value:jl.Integer):Option[Int] = value match {
     case null => None
     case x => Some(x.intValue)
   }
 
-  implicit def boxed_long_to_option(value:jl.Long):Option[Long] = value match {
+  implicit def apply(value:jl.Long):Option[Long] = value match {
     case null => None
     case x => Some(x.longValue)
   }
 
-  implicit def boxed_double_to_option(value:jl.Double):Option[Double] = value match {
+  implicit def apply(value:jl.Double):Option[Double] = value match {
     case null => None
     case x => Some(x.doubleValue)
   }
 
-  implicit def boxed_float_to_option(value:jl.Float):Option[Float] = value match {
+  implicit def apply(value:jl.Float):Option[Float] = value match {
     case null => None
     case x => Some(x.floatValue)
   }
 
-  implicit def any_to_option[T](value:T):Option[T] = value match {
+  implicit def apply[T](value:T):Option[T] = value match {
     case null => None
     case x => Some(x)
   }



Mime
View raw message