removed asList, change \
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@6756 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
e8040a53d9
commit
6dde97ab9a
|
@ -46,7 +46,7 @@ abstract class NodeSeq extends Seq[Node] {
|
|||
var res: NodeSeq = NodeSeq.Empty;
|
||||
that match {
|
||||
case "_" =>
|
||||
res = for( val x <- this; val y <- x.child: NodeSeq) yield { y }
|
||||
res = for( val x <- this; val y <- x.child; y.typeTag$ != -1) yield { y }
|
||||
|
||||
case _ if (that.charAt(0) == '@') && (this.length == 1) =>
|
||||
val k = that.substring(1);
|
||||
|
@ -88,13 +88,11 @@ abstract class NodeSeq extends Seq[Node] {
|
|||
(s:String,x:Node) => s + x.toString()
|
||||
}
|
||||
|
||||
def asList = elements.toList;
|
||||
|
||||
def map(f: Node => NodeSeq): NodeSeq = flatMap(f)
|
||||
|
||||
def flatMap(f:Node => NodeSeq): NodeSeq = { val y = asList flatMap { x => f(x).asList }; y }
|
||||
def flatMap(f:Node => NodeSeq): NodeSeq = { val y = toList flatMap { x => f(x).toList }; y }
|
||||
|
||||
def filter(f:Node => Boolean): NodeSeq = { val x = asList filter f; x }
|
||||
def filter(f:Node => Boolean): NodeSeq = { val x = toList filter f; x }
|
||||
|
||||
def text: String = {
|
||||
val sb = new StringBuffer();
|
||||
|
|
Loading…
Reference in New Issue