aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorWouter van Oortmerssen <aardappel@gmail.com>2017-05-08 18:24:47 -0700
committerWouter van Oortmerssen <aardappel@gmail.com>2017-05-10 12:55:27 -0700
commit8468ea1ab410ffaa1eed99750e4c77b496b72fd5 (patch)
tree30da942bc83267464cd2680aa0e84ba29d164015 /docs
parent0920d663d5e6022788bec406197afa41f05199f9 (diff)
downloadflatbuffers-8468ea1ab410ffaa1eed99750e4c77b496b72fd5.tar.gz
Fixed LookupByKey for Java & C#
Change-Id: I05c02223675dee241d1ae8cb466e5186444058c8 Tested: on Linux.
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/source/JavaCsharpUsage.md17
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/source/JavaCsharpUsage.md b/docs/source/JavaCsharpUsage.md
index cc58f856..8f99d3a8 100755
--- a/docs/source/JavaCsharpUsage.md
+++ b/docs/source/JavaCsharpUsage.md
@@ -147,19 +147,20 @@ To use it:
array.
- Instead of calling standard generated method,
e.g.: `Monster.createTestarrayoftablesVector`,
- call `CreateMySortedVectorOfTables` in C# or
+ call `CreateSortedVectorOfMonster` in C# or
`createSortedVectorOfTables` (from the `FlatBufferBuilder` object) in Java,
which will first sort all offsets such that the tables they refer to
are sorted by the key field, then serialize it.
-- Now when you're accessing the FlatBuffer, you can use `LookupByKey`
- to access elements of the vector, e.g.:
- `Monster.lookupByKey(tablesVectorOffset, "Frodo", dataBuffer)`,
+- Now when you're accessing the FlatBuffer, you can use
+ the `ByKey` accessor to access elements of the vector, e.g.:
+ `monster.testarrayoftablesByKey("Frodo")` in Java or
+ `monster.TestarrayoftablesByKey("Frodo")` in C#,
which returns an object of the corresponding table type,
or `null` if not found.
- `LookupByKey` performs a binary search, so should have a similar speed to
- `Dictionary`, though may be faster because of better caching. `LookupByKey`
- only works if the vector has been sorted, it will likely not find elements
- if it hasn't been sorted.
+ `ByKey` performs a binary search, so should have a similar
+ speed to `Dictionary`, though may be faster because of better caching.
+ `ByKey` only works if the vector has been sorted, it will
+ likely not find elements if it hasn't been sorted.
## Text parsing