Skip to content

Commit c1e232c

Browse files
committed
JavaDocs only
1 parent c908f18 commit c1e232c

File tree

6 files changed

+34
-36
lines changed

6 files changed

+34
-36
lines changed

src/main/java/org/lmdbjava/ByteUnit.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ public long toPebibytes(long count) {
338338
* will use a default {@link DecimalFormat} instance for formatting the
339339
* number.
340340
*
341-
* @param bytes
342-
* @return
341+
* @param bytes number of bytes
342+
* @return a human-readable size string
343343
*/
344344
public static String format(long bytes) {
345345
return format(bytes, new DecimalFormat(DEFAULT_FORMAT_PATTERN));
@@ -350,9 +350,9 @@ public static String format(long bytes) {
350350
* will use a {@link DecimalFormat} instance with {@code pattern} for
351351
* formatting the number.
352352
*
353-
* @param bytes
354-
* @param pattern
355-
* @return
353+
* @param bytes number of bytes
354+
* @param pattern decimal format pattern
355+
* @return a human-readable size string
356356
*/
357357
public static String format(long bytes, String pattern) {
358358
return format(bytes, new DecimalFormat(pattern));
@@ -363,9 +363,9 @@ public static String format(long bytes, String pattern) {
363363
* will use {@code
364364
* format} for formatting the number.
365365
*
366-
* @param bytes
367-
* @param format
368-
* @return
366+
* @param bytes number of bytes
367+
* @param format number format object
368+
* @return a human-readable size string
369369
*/
370370
public static String format(long bytes, NumberFormat format) {
371371
if (bytes < 0) {

src/main/java/org/lmdbjava/Cursor.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public void delete(final PutFlags... f) {
104104
/**
105105
* Position at first key/data item
106106
*
107-
* @return
107+
* @return false if requested position not found
108108
*/
109109
public boolean first() {
110110
return seek(MDB_FIRST);
@@ -149,7 +149,7 @@ public T key() {
149149
/**
150150
* Position at last key/data item
151151
*
152-
* @return
152+
* @return false if requested position not found
153153
*/
154154
public boolean last() {
155155
return seek(MDB_LAST);
@@ -158,7 +158,7 @@ public boolean last() {
158158
/**
159159
* Position at next data item
160160
*
161-
* @return
161+
* @return false if requested position not found
162162
*/
163163
public boolean next() {
164164
return seek(MDB_NEXT);
@@ -167,7 +167,7 @@ public boolean next() {
167167
/**
168168
* Position at previous data item
169169
*
170-
* @return
170+
* @return false if requested position not found
171171
*/
172172
public boolean prev() {
173173
return seek(MDB_PREV);
@@ -224,18 +224,18 @@ public void renew(final Txn<T> txn) {
224224
}
225225

226226
/**
227-
* Reserve space for data of the given size, but don't copy the given
228-
* val.Instead, return a pointer to the reserved space, which the caller can
229-
* fill in later - before the next update operation or the transaction ends.
230-
* This saves an extra memcpy if the data is being generated later. LMDB does
227+
* Reserve space for data of the given size, but don't copy the given val.
228+
* Instead, return a pointer to the reserved space, which the caller can fill
229+
* in later - before the next update operation or the transaction ends. This
230+
* saves an extra memcpy if the data is being generated later. LMDB does
231231
* nothing else with this memory, the caller is expected to modify all of the
232232
* space requested.
233233
* <p>
234234
* This flag must not be specified if the database was opened with MDB_DUPSORT
235235
*
236236
* @param key key to store in the database (not null)
237237
* @param size size of the value to be stored in the database (not null)
238-
* @return
238+
* @return a buffer that can be used to modify the value
239239
*/
240240
public T reserve(final T key, final int size) {
241241
if (SHOULD_CHECK) {

src/main/java/org/lmdbjava/CursorIterator.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* Iterator for entries that follow the same semantics as Cursors with regards
2828
* to read and write transactions and how they are closed.
2929
*
30-
* @param <T>
30+
* @param <T> buffer type
3131
*/
3232
public final class CursorIterator<T> implements
3333
Iterator<CursorIterator.KeyVal<T>>,
@@ -65,7 +65,7 @@ public boolean hasNext() {
6565

6666
/**
6767
*
68-
* @return
68+
* @return an iterator
6969
*/
7070
public Iterable<KeyVal<T>> iterable() {
7171
return () -> CursorIterator.this;
@@ -132,19 +132,19 @@ private boolean tryToComputeNext() {
132132
public static final class KeyVal<T> {
133133

134134
/**
135-
*
135+
* The key.
136136
*/
137137
public final T key;
138138

139139
/**
140-
*
140+
* The value.
141141
*/
142142
public final T val;
143143

144144
/**
145145
*
146-
* @param key
147-
* @param val
146+
* @param key the key
147+
* @param val the value
148148
*/
149149
public KeyVal(T key, T val) {
150150
this.key = key;

src/main/java/org/lmdbjava/Dbi.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ public void put(final Txn<T> txn, final T key, final T val,
283283
* @param txn transaction handle (not null; not committed; must be R-W)
284284
* @param key key to store in the database (not null)
285285
* @param size size of the value to be stored in the database
286-
* @return
286+
* @return a buffer that can be used to modify the value
287287
*/
288288
public T reserve(Txn<T> txn, final T key, final int size) {
289289
if (SHOULD_CHECK) {

src/main/java/org/lmdbjava/Env.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public static Builder<ByteBuffer> create() {
6666
/**
6767
* Create an {@link Env} using the passed {@link BufferProxy}.
6868
*
69-
* @param <T>
69+
* @param <T> buffer type
7070
* @param proxy the proxy to use (required)
7171
* @return the environment (never null)
7272
*/
@@ -274,7 +274,7 @@ public Txn<T> txn(final Txn<T> parent, final TxnFlags... flags) {
274274
/**
275275
* Obtain a read-only transaction.
276276
*
277-
* @return
277+
* @return a read-only transaction
278278
*/
279279
public Txn<T> txnRead() {
280280
return new Txn<>(this, null, proxy, MDB_RDONLY);
@@ -283,7 +283,7 @@ public Txn<T> txnRead() {
283283
/**
284284
* Obtain a read-write transaction.
285285
*
286-
* @return
286+
* @return a read-write transaction
287287
*/
288288
public Txn<T> txnWrite() {
289289
return new Txn<>(this, null, proxy);
@@ -338,7 +338,7 @@ private Builder(Env<T> env) {
338338
* @param path file system destination
339339
* @param mode Unix permissions to set on created files and semaphores
340340
* @param flags the flags for this new environment
341-
* @return
341+
* @return an environment ready for use
342342
*/
343343
public Env<T> open(final File path, final int mode,
344344
final EnvFlags... flags) {
@@ -360,7 +360,7 @@ public Env<T> open(final File path, final int mode,
360360
*
361361
* @param path file system destination
362362
* @param flags the flags for this new environment
363-
* @return
363+
* @return an environment ready for use
364364
*/
365365
public Env<T> open(final File path, final EnvFlags... flags) {
366366
return open(path, 0664, flags);
@@ -370,7 +370,7 @@ public Env<T> open(final File path, final EnvFlags... flags) {
370370
* Sets the map size.
371371
*
372372
* @param mapSize new limit in bytes
373-
* @return
373+
* @return the builder
374374
*/
375375
public Builder<T> setMapSize(final long mapSize) {
376376
if (env.open) {
@@ -388,7 +388,7 @@ public Builder<T> setMapSize(final long mapSize) {
388388
*
389389
* @param size the size in given unit.
390390
* @param unit the unit to use for the size.
391-
* @return
391+
* @return the builder
392392
*/
393393
public Builder<T> setMapSize(final int size, ByteUnit unit) {
394394
return setMapSize(unit.toBytes(size));
@@ -398,7 +398,7 @@ public Builder<T> setMapSize(final int size, ByteUnit unit) {
398398
* Sets the maximum number of databases (ie {@link Dbi}s permitted.
399399
*
400400
* @param dbs new limit
401-
* @return
401+
* @return the builder
402402
*/
403403
public Builder<T> setMaxDbs(final int dbs) {
404404
if (env.open) {
@@ -415,7 +415,7 @@ public Builder<T> setMaxDbs(final int dbs) {
415415
* Sets the maximum number of databases permitted.
416416
*
417417
* @param readers new limit
418-
* @return
418+
* @return the builder
419419
*/
420420
public Builder<T> setMaxReaders(final int readers) {
421421
if (env.open) {

src/main/java/org/lmdbjava/Txn.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ public void abort() {
9999
* <p>
100100
* Closing the transaction will invoke
101101
* {@link BufferProxy#deallocate(java.lang.Object)} for each read-only buffer
102-
* (ie the key and value) as well as any buffers allocated via
103-
* {@link #allocate(int)}. As such these buffers must not be used after the
104-
* transaction has closed.
102+
* (ie the key and value).
105103
*/
106104
@Override
107105
public void close() {

0 commit comments

Comments
 (0)