From b54e9ba78e2a297fc1d422dc0960a828ab39657c Mon Sep 17 00:00:00 2001 From: Oliver Schulz Date: Sat, 26 May 2012 12:29:03 +0200 Subject: [PATCH] Improved documentation of ByteString methods compact and isCompact --- akka-actor/src/main/scala/akka/util/ByteString.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/akka-actor/src/main/scala/akka/util/ByteString.scala b/akka-actor/src/main/scala/akka/util/ByteString.scala index f5c27ca19f..3eff32f10f 100644 --- a/akka-actor/src/main/scala/akka/util/ByteString.scala +++ b/akka-actor/src/main/scala/akka/util/ByteString.scala @@ -311,12 +311,16 @@ sealed abstract class ByteString extends IndexedSeq[Byte] with IndexedSeqOptimiz /** * Create a new ByteString with all contents compacted into a single, * full byte array. + * If isCompact returns true, compact is an O(1) operation, but + * might return a different object with an optimized implementation. */ def compact: CompactByteString /** - * Check whether this ByteString is compact in memory - * (i.e. represented by a single, full byte array). + * Check whether this ByteString is compact in memory. + * If the ByteString is compact, it might, however, not be represented + * by an object that takes full adventage of that fact. Use compact to + * get such an object. */ def isCompact: Boolean