Skip to content

Commit 7765875

Browse files
paulpadriaanm
authored andcommitted
Third collections commit from Todd Vierling.
Misc cleanups associated with the previous commits: limiting overly expanded types, fixing externally visible types for scaladoc, utilizing abstract collection classes where possible, etc.
1 parent 9aae87a commit 7765875

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/library/scala/xml/MetaData.scala

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ package scala.xml
1010

1111
import Utility.sbToString
1212
import annotation.tailrec
13-
import scala.collection.Iterator
13+
import scala.collection.{ AbstractIterable, Iterator }
1414

1515
/**
1616
* Copyright 2008 Google Inc. All Rights Reserved.
@@ -72,7 +72,12 @@ object MetaData {
7272
* Copyright 2008 Google Inc. All Rights Reserved.
7373
* @author Burak Emir <bqe@google.com>
7474
*/
75-
abstract class MetaData extends Iterable[MetaData] with Equality with Serializable {
75+
abstract class MetaData
76+
extends AbstractIterable[MetaData]
77+
with Iterable[MetaData]
78+
with Equality
79+
with Serializable {
80+
7681
/** Updates this MetaData with the MetaData given as argument. All attributes that occur in updates
7782
* are part of the resulting MetaData. If an attribute occurs in both this instance and
7883
* updates, only the one in updates is part of the result (avoiding duplicates). For prefixed

src/library/scala/xml/pull/XMLEventReader.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ import scala.xml.parsing.{ ExternalSources, MarkupHandler, MarkupParser }
2323
* @author Burak Emir
2424
* @author Paul Phillips
2525
*/
26-
class XMLEventReader(src: Source) extends ProducerConsumerIterator[XMLEvent] {
26+
class XMLEventReader(src: Source)
27+
extends collection.AbstractIterator[XMLEvent]
28+
with ProducerConsumerIterator[XMLEvent] {
29+
2730
// We implement a pull parser as an iterator, but since we may be operating on
2831
// a stream (e.g. XML over a network) there may be arbitrarily long periods when
2932
// the queue is empty. Fortunately the ProducerConsumerIterator is ideally

0 commit comments

Comments
 (0)