summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Haller <hallerp@gmail.com>2011-03-08 15:41:49 +0000
committerPhilipp Haller <hallerp@gmail.com>2011-03-08 15:41:49 +0000
commitcabd899188e7882bb17e0e72cc563b52caf48de3 (patch)
tree0a454570ce76de1c8b8c98c9f099c407da15664e
parent783721e98a4f61fc0c72298811b15e99c058d5e6 (diff)
downloadscala-cabd899188e7882bb17e0e72cc563b52caf48de3.tar.gz
scala-cabd899188e7882bb17e0e72cc563b52caf48de3.tar.bz2
scala-cabd899188e7882bb17e0e72cc563b52caf48de3.zip
Added documentation in annotation.unique packag...
Added documentation in annotation.unique package object. No review.
-rw-r--r--src/library/scala/annotation/unique/package.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library/scala/annotation/unique/package.scala b/src/library/scala/annotation/unique/package.scala
index 7fc4101b7e..1cb652a084 100644
--- a/src/library/scala/annotation/unique/package.scala
+++ b/src/library/scala/annotation/unique/package.scala
@@ -26,6 +26,16 @@ package object unique {
def captured: A = x
}
+ /* Swaps an object stored in a unique field with another unique object.
+ *
+ * The unique object that is the new value of the unique field becomes
+ * unusable by the caller.
+ *
+ * @param to the unique field that is the target of the swap
+ * @param from the unique object that is moved into the unique field
+ * @return the unique object that was the value of the unique
+ * field before the swap
+ */
def swap[A, B <: A](to: A, from: B): A = to
}