mirror of
https://github.com/wassname/ray.git
synced 2026-07-01 08:53:44 +08:00
[Java] Fix return of java doc (#13601)
This commit is contained in:
+2
-2
@@ -50,8 +50,8 @@ public final class KeyGroupAssignment {
|
||||
* Assigning the key to a key-group index.
|
||||
*
|
||||
* @param key the key to assign.
|
||||
* @param maxParallelism the maximum parallelism. Returns the key-group index to which the given
|
||||
* key is assigned.
|
||||
* @param maxParallelism the maximum parallelism.
|
||||
* @return the key-group index to which the given key is assigned.
|
||||
*/
|
||||
public static int assignKeyGroupIndexForKey(Object key, int maxParallelism) {
|
||||
return Math.abs(key.hashCode() % maxParallelism);
|
||||
|
||||
+8
-7
@@ -28,7 +28,8 @@ public interface MapState<K, V> extends UnaryState<Map<K, V>> {
|
||||
/**
|
||||
* Returns the current value associated with the given key.
|
||||
*
|
||||
* @param key The key of the mapping Returns The value of the mapping with the given key
|
||||
* @param key The key of the mapping
|
||||
* @return The value of the mapping with the given key
|
||||
*/
|
||||
V get(K key);
|
||||
|
||||
@@ -64,8 +65,8 @@ public interface MapState<K, V> extends UnaryState<Map<K, V>> {
|
||||
/**
|
||||
* Returns whether there exists the given mapping.
|
||||
*
|
||||
* @param key The key of the mapping Returns True if there exists a mapping whose key equals to
|
||||
* the given key
|
||||
* @param key The key of the mapping
|
||||
* @return True if there exists a mapping whose key equals to the given key
|
||||
*/
|
||||
default boolean contains(K key) {
|
||||
return get().containsKey(key);
|
||||
@@ -74,7 +75,7 @@ public interface MapState<K, V> extends UnaryState<Map<K, V>> {
|
||||
/**
|
||||
* Returns all the mappings in the state
|
||||
*
|
||||
* <p>Returns An iterable view of all the key-value pairs in the state.
|
||||
* @return An iterable view of all the key-value pairs in the state.
|
||||
*/
|
||||
default Iterable<Entry<K, V>> entries() {
|
||||
return get().entrySet();
|
||||
@@ -83,7 +84,7 @@ public interface MapState<K, V> extends UnaryState<Map<K, V>> {
|
||||
/**
|
||||
* Returns all the keys in the state
|
||||
*
|
||||
* <p>Returns An iterable view of all the keys in the state.
|
||||
* @return An iterable view of all the keys in the state.
|
||||
*/
|
||||
default Iterable<K> keys() {
|
||||
return get().keySet();
|
||||
@@ -92,7 +93,7 @@ public interface MapState<K, V> extends UnaryState<Map<K, V>> {
|
||||
/**
|
||||
* Returns all the values in the state.
|
||||
*
|
||||
* <p>Returns An iterable view of all the values in the state.
|
||||
* @return An iterable view of all the values in the state.
|
||||
*/
|
||||
default Iterable<V> values() {
|
||||
return get().values();
|
||||
@@ -101,7 +102,7 @@ public interface MapState<K, V> extends UnaryState<Map<K, V>> {
|
||||
/**
|
||||
* Iterates over all the mappings in the state.
|
||||
*
|
||||
* <p>Returns An iterator over all the mappings in the state
|
||||
* @return An iterator over all the mappings in the state
|
||||
*/
|
||||
default Iterator<Entry<K, V>> iterator() {
|
||||
return get().entrySet().iterator();
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ public interface UnaryState<O> extends State {
|
||||
/**
|
||||
* get the value in state
|
||||
*
|
||||
* <p>Returns the value in state
|
||||
* @return the value in state
|
||||
*/
|
||||
O get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user