Test two objects for inequality.
Test two objects for inequality.
true
if !(this == that), false otherwise.
Equivalent to x.hashCode
except for boxed numeric types and null
.
Equivalent to x.hashCode
except for boxed numeric types and null
.
For numerics, it returns a hash value which is consistent
with value equality: if two value type instances compare
as true, then ## will produce the same hash value for each
of them.
For null
returns a hashcode where null.hashCode
throws a
NullPointerException
.
a hash value consistent with ==
Test two objects for equality.
Test two objects for equality.
The expression x == that
is equivalent to if (x eq null) that eq null else x.equals(that)
.
true
if the receiver object is equivalent to the argument; false
otherwise.
Appends "s" and escapes and " i s with \"
Appends "s" if string s
does not contain ",
's' otherwise.
Cast the receiver object to be of type T0
.
Cast the receiver object to be of type T0
.
Note that the success of a cast at runtime is modulo Scala's erasure semantics.
Therefore the expression 1.asInstanceOf[String]
will throw a ClassCastException
at
runtime, while the expression List(1).asInstanceOf[List[String]]
will not.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the requested type.
the receiver object.
if the receiver object is not an instance of the erasure of type T0
.
Returns null
if the value is a correct attribute value,
error message if it isn't.
Create a copy of the receiver object.
Adds all namespaces in node to set.
Returns a set of all namespaces used in a sequence of nodes and all their descendants, including the empty namespaces.
Tests whether the argument (arg0
) is a reference to the receiver object (this
).
Tests whether the argument (arg0
) is a reference to the receiver object (this
).
The eq
method implements an equivalence relation on
non-null instances of AnyRef
, and has three additional properties:
x
and y
of type AnyRef
, multiple invocations of
x.eq(y)
consistently returns true
or consistently returns false
.x
of type AnyRef
, x.eq(null)
and null.eq(x)
returns false
.null.eq(null)
returns true
. When overriding the equals
or hashCode
methods, it is important to ensure that their behavior is
consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2
), they
should be equal to each other (o1 == o2
) and they should hash to the same value (o1.hashCode == o2.hashCode
).
true
if the argument is a reference to the receiver object; false
otherwise.
The equality method for reference types.
Appends escaped string to s
.
Escapes the characters < > & and " from string.
Called by the garbage collector on the receiver object when there are no more references to the object.
Called by the garbage collector on the receiver object when there are no more references to the object.
The details of when and if the finalize
method is invoked, as
well as the interaction between finalize
and non-local returns
and exceptions, are all platform dependent.
A representation that corresponds to the dynamic class of the receiver object.
A representation that corresponds to the dynamic class of the receiver object.
The nature of the representation is platform dependent.
a representation that corresponds to the dynamic class of the receiver object.
not specified by SLS as a member of AnyRef
Returns a hashcode for the given constituents of a node
The hashCode method for reference types.
These are 99% sure to be redundant but refactoring on the safe side.
These are 99% sure to be redundant but refactoring on the safe side.
Test whether the dynamic type of the receiver object is T0
.
Test whether the dynamic type of the receiver object is T0
.
Note that the result of the test is modulo Scala's erasure semantics.
Therefore the expression 1.isInstanceOf[String]
will return false
, while the
expression List(1).isInstanceOf[List[String]]
will return true
.
In the latter example, because the type argument is erased as part of compilation it is
not possible to check whether the contents of the list are of the specified type.
true
if the receiver object is an instance of erasure of type T0
; false
otherwise.
Name ::= ( Letter | '_' ) (NameChar)*
See [5] of XML 1.0 specification.
(#x20 | #x9 | #xD | #xA)+
(#x20 | #x9 | #xD | #xA)
Returns true
if the encoding name is a valid IANA encoding.
Returns true
if the encoding name is a valid IANA encoding.
This method does not verify that there is a decoder available
for this encoding, only that the characters are valid for an
IANA encoding name.
The IANA encoding name.
Equivalent to !(this eq that)
.
Equivalent to !(this eq that)
.
true
if the argument is not a reference to the receiver object; false
otherwise.
Wakes up a single thread that is waiting on the receiver object's monitor.
Wakes up a single thread that is waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
Wakes up all threads that are waiting on the receiver object's monitor.
Wakes up all threads that are waiting on the receiver object's monitor.
not specified by SLS as a member of AnyRef
CharRef ::= "&#" '0'..'9' {'0'..'9'} ";" | "&#x" '0'..'9'|'A'..'F'|'a'..'f' { hexdigit } ";"
See [66]
Returns prefix of qualified name if any.
Serialize an XML Node to a StringBuilder.
Serialize an XML Node to a StringBuilder.
This is essentially a minor rework of toXML
that can't have the same name due to an unfortunate
combination of named/default arguments and overloading.
use a Writer instead
Return the node with its attribute list sorted alphabetically (prefixes are ignored)
returns a sorted attribute list
Creates a String representation of this object.
Creates a String representation of this object. The default representation is platform dependent. On the java platform it is the concatenation of the class name, "@", and the object's hashcode in hexadecimal.
a String representation of the object.
Trims an element - call this method, when you know that it is an element (and not a text node) so you know that it will not be trimmed away.
Trims an element - call this method, when you know that it is an
element (and not a text node) so you know that it will not be trimmed
away. With this assumption, the function can return a Node
, rather
than a Seq[Node]
. If you don't know, call trimProper
and account
for the fact that you may get back an empty sequence of nodes.
Precondition: node is not a text node (it might be trimmed)
trim a child of an element.
trim a child of an element. Attribute
values and Atom
nodes that
are not Text
nodes are unaffected.
Appends unescaped string to s
, amp
becomes &
,
lt
becomes <
etc.
Appends unescaped string to s
, amp
becomes &
,
lt
becomes <
etc..
null
if ref
was not a predefined entity.
Serialize the provided Node to the provided StringBuilder.
Serialize the provided Node to the provided StringBuilder.
Note that calling this source-compatible method will result in the same old, arguably almost universally unwanted, behaviour.
(Since version 2.10.0) Please use serialize
instead and specify a minimizeTags
parameter
The
Utility
object provides utility functions for processing instances of bound and not bound XML classes, as well as escaping text nodes.