Skip to content

Commit

Permalink
Fix some comments, make Abled sealed.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmc committed Sep 27, 2009
1 parent 7e302c8 commit f042124
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/net/jimmc/util/AbledPublisher.scala
@@ -1,12 +1,12 @@
package net.jimmc.util

//For subscrobers of things that turn on and off
//For subscribers of things that turn on and off
class AbledPublisher extends Publisher[AbledPublisher.Abled]

// use "import AbledPublisher._" to pick up these definitions
object AbledPublisher {

abstract class Abled { val state:Boolean }
sealed abstract class Abled { val state:Boolean }
case object Enabled extends Abled { override val state = true }
case object Disabled extends Abled { override val state = false }

Expand Down
2 changes: 1 addition & 1 deletion src/net/jimmc/util/Publisher.scala
Expand Up @@ -3,7 +3,7 @@ package net.jimmc.util
/** Manage a subscriber list.
* There are no guarantees on the order of subscribers in the list.
* This code is a slightly modified version of ListenerManager
* as published to my blog in 2008.
* as published to my blog in April 2009.
*/
trait Publisher[E] {
type S = (E) => Unit
Expand Down

0 comments on commit f042124

Please sign in to comment.