mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:47:36 +00:00
fix doc comments in dart:io and collection types
R=lrn@google.com Review-Url: https://codereview.chromium.org/2905013003 .
This commit is contained in:
parent
d7d3ee40dd
commit
46110c331b
|
@ -308,7 +308,7 @@ abstract class Future<T> {
|
|||
* non-null result of successful futures.
|
||||
* This makes it posible to `cleanUp` resources that would otherwise be
|
||||
* lost (since the returned future does not provide access to these values).
|
||||
* The [cleanup] function is unused if there is no error.
|
||||
* The [cleanUp] function is unused if there is no error.
|
||||
*
|
||||
* The call to `cleanUp` should not throw. If it does, the error will be an
|
||||
* uncaught asynchronous error.
|
||||
|
|
|
@ -76,9 +76,9 @@ abstract class IterableMixin<E> implements Iterable<E> {
|
|||
return buffer.toString();
|
||||
}
|
||||
|
||||
bool any(bool f(E element)) {
|
||||
bool any(bool test(E element)) {
|
||||
for (E element in this) {
|
||||
if (f(element)) return true;
|
||||
if (test(element)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -434,11 +434,6 @@ abstract class ListMixin<E> implements List<E> {
|
|||
return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the last index in the list [a] of the given [element], starting
|
||||
* the search at index [startIndex] to 0.
|
||||
* Returns -1 if [element] is not found.
|
||||
*/
|
||||
int lastIndexOf(Object element, [int startIndex]) {
|
||||
if (startIndex == null) {
|
||||
startIndex = this.length - 1;
|
||||
|
|
|
@ -13,9 +13,9 @@ part of dart.collection;
|
|||
* implementing `keys`, `operator[]`, `operator[]=`, `remove` and `clear`.
|
||||
* The remaining operations are implemented in terms of these five.
|
||||
*
|
||||
* The `keys` iterable should have efficient [length] and [contains]
|
||||
* operations, and it should catch concurrent modifications of the keys
|
||||
* while iterating.
|
||||
* The `keys` iterable should have efficient [Iterable.length] and
|
||||
* [Iterable.contains] operations, and it should catch concurrent modifications
|
||||
* of the keys while iterating.
|
||||
*
|
||||
* A more efficient implementation is usually possible by overriding
|
||||
* some of the other members as well.
|
||||
|
@ -31,9 +31,9 @@ abstract class MapBase<K, V> = Object with MapMixin<K, V>;
|
|||
* implementing `keys`, `operator[]`, `operator[]=`, `remove` and `clear`.
|
||||
* The remaining operations are implemented in terms of these five.
|
||||
*
|
||||
* The `keys` iterable should have efficient [length] and [contains]
|
||||
* operations, and it should catch concurrent modifications of the keys
|
||||
* while iterating.
|
||||
* The `keys` iterable should have efficient [Iterable.length] and
|
||||
* [Iterable.contains] operations, and it should catch concurrent modifications
|
||||
* of the keys while iterating.
|
||||
*
|
||||
* A more efficient implementation is usually possible by overriding
|
||||
* some of the other members as well.
|
||||
|
@ -93,9 +93,9 @@ abstract class MapMixin<K, V> implements Map<K, V> {
|
|||
* The remaining non-modifying operations are implemented in terms of `keys`
|
||||
* and `operator[]`.
|
||||
*
|
||||
* The `keys` iterable should have efficient [length] and [contains]
|
||||
* operations, and it should catch concurrent modifications of the keys
|
||||
* while iterating.
|
||||
* The `keys` iterable should have efficient [Iterable.length] and
|
||||
* [Iterable.contains] operations, and it should catch concurrent modifications
|
||||
* of the keys while iterating.
|
||||
*
|
||||
* A more efficient implementation is usually possible by overriding
|
||||
* some of the other members as well.
|
||||
|
|
|
@ -557,10 +557,10 @@ class ListQueue<E> extends ListIterable<E> implements Queue<E> {
|
|||
|
||||
Iterator<E> get iterator => new _ListQueueIterator<E>(this);
|
||||
|
||||
void forEach(void action(E element)) {
|
||||
void forEach(void f(E element)) {
|
||||
int modificationCount = _modificationCount;
|
||||
for (int i = _head; i != _tail; i = (i + 1) & (_table.length - 1)) {
|
||||
action(_table[i]);
|
||||
f(_table[i]);
|
||||
_checkModification(modificationCount);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,13 +29,13 @@ abstract class SetMixin<E> implements Set<E> {
|
|||
// If/when Dart mixins get more powerful, we should just create a single
|
||||
// Mixin class from IterableMixin and the new methods of this class.
|
||||
|
||||
bool add(E element);
|
||||
bool add(E value);
|
||||
|
||||
bool contains(Object element);
|
||||
|
||||
E lookup(Object element);
|
||||
|
||||
bool remove(Object element);
|
||||
bool remove(Object value);
|
||||
|
||||
Iterator<E> get iterator;
|
||||
|
||||
|
|
|
@ -765,8 +765,8 @@ class SplayTreeSet<E> extends _SplayTree<E, _SplayTreeNode<E>>
|
|||
}
|
||||
|
||||
// From Set.
|
||||
bool contains(Object object) {
|
||||
return _validKey(object) && _splay(object as dynamic/*=E*/) == 0;
|
||||
bool contains(Object element) {
|
||||
return _validKey(element) && _splay(element as dynamic/*=E*/) == 0;
|
||||
}
|
||||
|
||||
bool add(E element) {
|
||||
|
|
|
@ -291,9 +291,9 @@ abstract class Iterable<E> {
|
|||
* Checks every element in iteration order, and returns `false` if
|
||||
* any of them make [test] return `false`, otherwise returns `true`.
|
||||
*/
|
||||
bool every(bool f(E element)) {
|
||||
bool every(bool test(E element)) {
|
||||
for (E element in this) {
|
||||
if (!f(element)) return false;
|
||||
if (!test(element)) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -330,9 +330,9 @@ abstract class Iterable<E> {
|
|||
* Checks every element in iteration order, and returns `true` if
|
||||
* any of them make [test] return `true`, otherwise returns false.
|
||||
*/
|
||||
bool any(bool f(E element)) {
|
||||
bool any(bool test(E element)) {
|
||||
for (E element in this) {
|
||||
if (f(element)) return true;
|
||||
if (test(element)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -22,28 +22,22 @@ abstract class ZLibOption {
|
|||
/// and [ZLibDecoder.windowBits].
|
||||
static const int DEFAULT_WINDOW_BITS = 15;
|
||||
|
||||
/// Minimal value for [ZLibCodec.level], [ZLibEncoder.level]
|
||||
/// and [ZLibDecoder.level].
|
||||
/// Minimal value for [ZLibCodec.level] and [ZLibEncoder.level].
|
||||
static const int MIN_LEVEL = -1;
|
||||
|
||||
/// Maximal value for [ZLibCodec.level], [ZLibEncoder.level]
|
||||
/// and [ZLibDecoder.level].
|
||||
/// Maximal value for [ZLibCodec.level] and [ZLibEncoder.level]
|
||||
static const int MAX_LEVEL = 9;
|
||||
|
||||
/// Default value for [ZLibCodec.level], [ZLibEncoder.level]
|
||||
/// and [ZLibDecoder.level].
|
||||
/// Default value for [ZLibCodec.level] and [ZLibEncoder.level].
|
||||
static const int DEFAULT_LEVEL = 6;
|
||||
|
||||
/// Minimal value for [ZLibCodec.memLevel], [ZLibEncoder.memLevel]
|
||||
/// and [ZLibDecoder.memLevel].
|
||||
/// Minimal value for [ZLibCodec.memLevel] and [ZLibEncoder.memLevel].
|
||||
static const int MIN_MEM_LEVEL = 1;
|
||||
|
||||
/// Maximal value for [ZLibCodec.memLevel], [ZLibEncoder.memLevel]
|
||||
/// and [ZLibDecoder.memLevel].
|
||||
/// Maximal value for [ZLibCodec.memLevel] and [ZLibEncoder.memLevel].
|
||||
static const int MAX_MEM_LEVEL = 9;
|
||||
|
||||
/// Default value for [ZLibCodec.memLevel], [ZLibEncoder.memLevel]
|
||||
/// and [ZLibDecoder.memLevel].
|
||||
/// Default value for [ZLibCodec.memLevel] and [ZLibEncoder.memLevel].
|
||||
static const int DEFAULT_MEM_LEVEL = 8;
|
||||
|
||||
/// Recommended strategy for data produced by a filter (or predictor)
|
||||
|
|
|
@ -1367,7 +1367,7 @@ abstract class HttpClient {
|
|||
* The `Host` header for the request will be set to the value
|
||||
* [Uri.host]:[Uri.port] from [url]. This can be overridden through the
|
||||
* [HttpClientRequest] interface before the request is sent. NOTE
|
||||
* if [host] is an IP address this will still be set in the `Host`
|
||||
* if [Uri.host] is an IP address this will still be set in the `Host`
|
||||
* header.
|
||||
*
|
||||
* For additional information on the sequence of events during an
|
||||
|
|
|
@ -68,8 +68,9 @@ abstract class RawSynchronousSocket {
|
|||
* Shutdown a socket in the provided direction.
|
||||
*
|
||||
* Calling shutdown will never throw an exception and calling it several times
|
||||
* is supported. If both [RECEIVE] and [SEND] directions are closed, the
|
||||
* socket is closed completely, the same as if [closeSync] has been called.
|
||||
* is supported. If both [SocketDirection.RECEIVE] and [SocketDirection.SEND]
|
||||
* directions are closed, the socket is closed completely, the same as if
|
||||
* [closeSync] has been called.
|
||||
*/
|
||||
void shutdown(SocketDirection direction);
|
||||
|
||||
|
|
Loading…
Reference in a new issue