From c25c92da401e7beec06d33423b9350b20eb62c5e Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Wed, 29 Jun 2011 21:44:37 -0400 Subject: [PATCH] add missing Attributed.get method --- util/collection/Attributes.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/util/collection/Attributes.scala b/util/collection/Attributes.scala index 980cbc9ec..6474fefb3 100644 --- a/util/collection/Attributes.scala +++ b/util/collection/Attributes.scala @@ -97,6 +97,7 @@ final case class AttributeEntry[T](key: AttributeKey[T], value: T) final case class Attributed[D](data: D)(val metadata: AttributeMap) { + def get[T](key: AttributeKey[T]): Option[T] = metadata.get(key) def put[T](key: AttributeKey[T], value: T): Attributed[D] = Attributed(data)(metadata.put(key, value)) def map[T](f: D => T): Attributed[T] = Attributed(f(data))(metadata) }