final case class LabeledElement(label: ResolvedName, element: Element) extends Node with Product with Serializable
First - why we need different entities than plain scala-xml ones?
The problem appeared when testing lawfulness of Optional[Elem, NonEmptyList[Elem]]
It was impossible to satisfy get what you set
law as modify
function may
modify label
which at the same time is the key for a lookup.
// just pseudo-code - elem is not a case class so it has no copy
val res = elemOptional.get("abc").modify(_.copy(label = "someNewLabel"))
res.get("abc") // will return None instead of modified elem...
To restrict user not to modify label of "zoomed-in" element we need to create our own Element
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- LabeledElement
- Serializable
- Serializable
- Product
- Equals
- Node
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
- new LabeledElement(label: ResolvedName, element: Element)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val element: Element
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val label: ResolvedName
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )