ICU-10180 document that a string trie cannot be empty

X-SVN-Rev: 34380
This commit is contained in:
Markus Scherer 2013-09-18 16:38:37 +00:00
parent 59d926f715
commit 4f63a56669
2 changed files with 14 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2010-2012, International Business Machines
* Copyright (C) 2010-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: bytestriebuilder.h
@ -71,6 +71,9 @@ public:
* Builds a BytesTrie for the add()ed data.
* Once built, no further data can be add()ed until clear() is called.
*
* A BytesTrie cannot be empty. At least one (byte sequence, value) pair
* must have been add()ed.
*
* This method passes ownership of the builder's internal result array to the new trie object.
* Another call to any build() variant will re-serialize the trie.
* After clear() has been called, a new array will be used as well.
@ -88,6 +91,9 @@ public:
* Builds a BytesTrie for the add()ed data and byte-serializes it.
* Once built, no further data can be add()ed until clear() is called.
*
* A BytesTrie cannot be empty. At least one (byte sequence, value) pair
* must have been add()ed.
*
* Multiple calls to buildStringPiece() return StringPieces referring to the
* builder's same byte array, without rebuilding.
* If buildStringPiece() is called after build(), the trie will be

View File

@ -1,6 +1,6 @@
/*
*******************************************************************************
* Copyright (C) 2010-2012, International Business Machines
* Copyright (C) 2010-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: ucharstriebuilder.h
@ -70,6 +70,9 @@ public:
* Builds a UCharsTrie for the add()ed data.
* Once built, no further data can be add()ed until clear() is called.
*
* A UCharsTrie cannot be empty. At least one (string, value) pair
* must have been add()ed.
*
* This method passes ownership of the builder's internal result array to the new trie object.
* Another call to any build() variant will re-serialize the trie.
* After clear() has been called, a new array will be used as well.
@ -87,6 +90,9 @@ public:
* Builds a UCharsTrie for the add()ed data and UChar-serializes it.
* Once built, no further data can be add()ed until clear() is called.
*
* A UCharsTrie cannot be empty. At least one (string, value) pair
* must have been add()ed.
*
* Multiple calls to buildUnicodeString() set the UnicodeStrings to the
* builder's same UChar array, without rebuilding.
* If buildUnicodeString() is called after build(), the trie will be