Skip to content

Commit

Permalink
add miss method for c++ iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
halibobo1205 committed Aug 6, 2021
1 parent a169b78 commit 0458c36
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
24 changes: 24 additions & 0 deletions leveldb-api/src/main/java/org/iq80/leveldb/DBIterator.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,28 @@ public interface DBIterator
* Repositions the iterator so it is at the end of of the Database.
*/
void seekToLast();

/**
* An iterator is either positioned at a key/value pair, or
* not valid. This method returns true iff the iterator is valid.
* @return
*/
boolean Valid();

/**
* Return the key for the current entry. The underlying storage for
* the returned slice is valid only until the next modification of
* the iterator.
* REQUIRES: Valid()
*/
byte[] key();

/**
* Return the value for the current entry. The underlying storage for
* the returned slice is valid only until the next modification of
* the iterator.
* REQUIRES: Valid()
*/

byte[] value();
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ public void seekToLast()
throw new UnsupportedOperationException();
}

@Override
public boolean Valid() {
throw new UnsupportedOperationException();
}

@Override
public byte[] key() {
throw new UnsupportedOperationException();
}

@Override
public byte[] value() {
throw new UnsupportedOperationException();
}

@Override
public boolean hasPrev()
{
Expand Down

0 comments on commit 0458c36

Please sign in to comment.