提交 e907f273 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Add a warning to javadoc and some tags

上级 58bb0dbf
...@@ -391,6 +391,7 @@ public class MVMap<K, V> extends AbstractMap<K, V> ...@@ -391,6 +391,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
* *
* @param key the key * @param key the key
* @return the value, or null if not found * @return the value, or null if not found
* @throws ClassCastException if type of the specified key is not compatible with this map
*/ */
@Override @Override
public final V get(Object key) { public final V get(Object key) {
...@@ -403,6 +404,7 @@ public class MVMap<K, V> extends AbstractMap<K, V> ...@@ -403,6 +404,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
* @param p the root of a snapshot * @param p the root of a snapshot
* @param key the key * @param key the key
* @return the value, or null if not found * @return the value, or null if not found
* @throws ClassCastException if type of the specified key is not compatible with this map
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public V get(Page p, Object key) { public V get(Page p, Object key) {
...@@ -445,6 +447,7 @@ public class MVMap<K, V> extends AbstractMap<K, V> ...@@ -445,6 +447,7 @@ public class MVMap<K, V> extends AbstractMap<K, V>
* *
* @param key the key (may not be null) * @param key the key (may not be null)
* @return the old value if the key existed, or null otherwise * @return the old value if the key existed, or null otherwise
* @throws ClassCastException if type of the specified key is not compatible with this map
*/ */
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
......
...@@ -22,6 +22,13 @@ import java.util.Set; ...@@ -22,6 +22,13 @@ import java.util.Set;
/** /**
* A map that supports transactions. * A map that supports transactions.
* *
* <p>
* <b>Methods of this class may be changed at any time without notice.</b> If
* you use this class directly make sure that your application or library
* requires exactly the same version of MVStore or H2 jar as the version that
* you use during its development and build.
* </p>
*
* @param <K> the key type * @param <K> the key type
* @param <V> the value type * @param <V> the value type
*/ */
...@@ -192,6 +199,7 @@ public class TransactionMap<K, V> extends AbstractMap<K, V> { ...@@ -192,6 +199,7 @@ public class TransactionMap<K, V> extends AbstractMap<K, V> {
* *
* @param key the key * @param key the key
* @throws IllegalStateException if a lock timeout occurs * @throws IllegalStateException if a lock timeout occurs
* @throws ClassCastException if type of the specified key is not compatible with this map
*/ */
@Override @Override
public V remove(Object key) { public V remove(Object key) {
...@@ -362,6 +370,7 @@ public class TransactionMap<K, V> extends AbstractMap<K, V> { ...@@ -362,6 +370,7 @@ public class TransactionMap<K, V> extends AbstractMap<K, V> {
* *
* @param key the key * @param key the key
* @return the value or null * @return the value or null
* @throws ClassCastException if type of the specified key is not compatible with this map
*/ */
@Override @Override
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
...@@ -390,6 +399,7 @@ public class TransactionMap<K, V> extends AbstractMap<K, V> { ...@@ -390,6 +399,7 @@ public class TransactionMap<K, V> extends AbstractMap<K, V> {
* *
* @param key the key * @param key the key
* @return true if the map contains an entry for this key * @return true if the map contains an entry for this key
* @throws ClassCastException if type of the specified key is not compatible with this map
*/ */
@Override @Override
public boolean containsKey(Object key) { public boolean containsKey(Object key) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论