Skip to content

Commit

Permalink
Some docs for seq col overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
liach committed Nov 4, 2024
1 parent 0668e18 commit 006f864
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/java.base/share/classes/java/util/SequencedMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,34 @@ public int hashCode() {
}
return new SeqEntrySet();
}

/**
* @apiNote
* Implementations should almost always implement {@link #sequencedKeySet
* sequencedKeySet} together with {@code keySet}. The implementation of
* {@code keySet} can be as simple as calling {@link #sequencedKeySet
* sequencedKeySet} and returning the result.
*/
@Override
Set<K> keySet();

/**
* @apiNote
* Implementations should almost always implement {@link #sequencedValues
* sequencedValues} together with {@code values}. The implementation of
* {@code values} can be as simple as calling {@link #sequencedValues
* sequencedValues} and returning the result.
*/
@Override
Collection<V> values();

/**
* @apiNote
* Implementations should almost always implement {@link #sequencedEntrySet
* sequencedEntrySet} together with {@code entrySet}. The implementation of
* {@code entrySet} can be as simple as calling {@link #sequencedEntrySet
* sequencedEntrySet} and returning the result.
*/
@Override
Set<Entry<K, V>> entrySet();
}

0 comments on commit 006f864

Please sign in to comment.