dart-sdk/sdk/lib/core/iterable.dart
dgrove@google.com 037b2f8c60 svn add sdk
svn mv lib/sdk
svn mv lib/sdk/compiler sdk/lib/_internal
svn mv pkg/dartdoc sdk/lib/_internal

(cannot gcl upload due to .png's in dartdoc)

TBR=iposva
  


git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14473 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 14:53:15 +00:00

23 lines
813 B
Dart

// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/**
* The [Iterable] interface allows to get an [Iterator] out of an
* [Iterable] object.
*
* This interface is used by the for-in construct to iterate over an
* [Iterable] object.
* The for-in construct takes an [Iterable] object at the right-hand
* side, and calls its [iterator] method to get an [Iterator] on it.
*
* A user-defined class that implements the [Iterable] interface can
* be used as the right-hand side of a for-in construct.
*/
abstract class Iterable<E> {
/**
* Returns an [Iterator] that iterates over this [Iterable] object.
*/
Iterator<E> iterator();
}