org.scalatra.util

MapWithIndifferentAccess

trait MapWithIndifferentAccess [+B] extends Map[String, B]

Inspired by Rails' MapWithIndifferentAccess, allows the substitution of symbols for strings as map keys. Note that the map is still keyed with strings; symbols are stored in permgen, so symbol keys maps should not be used for maps with arbitrary keys. There is no performance gain using symbols. It is here to make our Rubyists feel more at home.

linear super types: Map[String, B], MapLike[String, B, Map[String, B]], Subtractable[String, Map[String, B]], PartialFunction[String, B], (String) ⇒ B, Iterable[(String, B)], IterableLike[(String, B), Map[String, B]], Equals, Traversable[(String, B)], GenericTraversableTemplate[(String, B), Iterable], TraversableLike[(String, B), Map[String, B]], TraversableOnce[(String, B)], FilterMonadic[(String, B), Map[String, B]], HasNewBuilder[(String, B), Map[String, B]], AnyRef, Any
known subclasses: MutableMapWithIndifferentAccess, FlashMap, AttributesMap, RichSession, RichServletContext, RichRequest
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. MapWithIndifferentAccess
  2. Map
  3. MapLike
  4. Subtractable
  5. PartialFunction
  6. Function1
  7. Iterable
  8. IterableLike
  9. Equals
  10. Traversable
  11. GenericTraversableTemplate
  12. TraversableLike
  13. TraversableOnce
  14. FilterMonadic
  15. HasNewBuilder
  16. AnyRef
  17. Any
Visibility
  1. Public
  2. All
Impl.
  1. Concrete
  2. Abstract

Type Members

  1. type Self = Map[String, B]

    attributes: protected
    definition classes: TraversableLike

Value Members

  1. def != (arg0: AnyRef) : Boolean

    attributes: final
    definition classes: AnyRef
  2. def != (arg0: Any) : Boolean

    o != arg0 is the same as !(o == (arg0)).

    o != arg0 is the same as !(o == (arg0)).

    arg0

    the object to compare against this object for dis-equality.

    returns

    false if the receiver object is equivalent to the argument; true otherwise.

    attributes: final
    definition classes: Any
  3. def ## () : Int

    attributes: final
    definition classes: AnyRef → Any
  4. def $asInstanceOf [T0] () : T0

    attributes: final
    definition classes: AnyRef
  5. def $isInstanceOf [T0] () : Boolean

    attributes: final
    definition classes: AnyRef
  6. def + [B1 >: B] (kv1: (String, B1), kv2: (String, B1), kvs: (String, B1)*) : Map[String, B1]

    definition classes: MapLike
  7. def + [B1 >: B] (kv: (String, B1)) : Map[String, B1]

    attributes: abstract
    definition classes: MapLike
  8. def ++ [B1 >: B] (xs: TraversableOnce[(String, B1)]) : Map[String, B1]

    definition classes: MapLike
  9. def ++ [B >: A, That] (that: TraversableOnce[B])(implicit bf: CanBuildFrom[Map[String, B], B, That]) : That

    definition classes: TraversableLike
  10. def - (elem1: String, elem2: String, elems: String*) : Map[String, B]

    definition classes: Subtractable
  11. def - (key: String) : Map[String, B]

    attributes: abstract
    definition classes: MapLike → Subtractable
  12. def -- (xs: TraversableOnce[String]) : Map[String, B]

    definition classes: Subtractable
  13. def /: [B] (z: B)(op: (B, (String, B)) ⇒ B) : B

    definition classes: TraversableOnce
  14. def :\ [B] (z: B)(op: ((String, B), B) ⇒ B) : B

    definition classes: TraversableOnce
  15. def == (arg0: AnyRef) : Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: AnyRef
  16. def == (arg0: Any) : Boolean

    o == arg0 is the same as o.equals(arg0).

    o == arg0 is the same as o.equals(arg0).

    arg0

    the object to compare against this object for equality.

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    attributes: final
    definition classes: Any
  17. def addString (b: StringBuilder, start: String, sep: String, end: String) : StringBuilder

    definition classes: MapLike → TraversableOnce
  18. def addString (b: StringBuilder) : StringBuilder

    definition classes: TraversableOnce
  19. def addString (b: StringBuilder, sep: String) : StringBuilder

    definition classes: TraversableOnce
  20. def andThen [C] (k: (B) ⇒ C) : PartialFunction[String, C]

    definition classes: PartialFunction → Function1
  21. def apply (key: Symbol) : B

  22. def apply (key: String) : B

    definition classes: MapLike → Function1
  23. def asInstanceOf [T0] : T0

    This method is used to cast the receiver object to be of type T0.

    This method is used to 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 expression1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expressionList(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 typed.

    returns

    the receiver object.

    attributes: final
    definition classes: Any
  24. def canEqual (that: Any) : Boolean

    definition classes: IterableLike → Equals
  25. def clone () : AnyRef

    This method creates and returns a copy of the receiver object.

    This method creates and returns a copy of the receiver object.

    The default implementation of the clone method is platform dependent.

    returns

    a copy of the receiver object.

    attributes: protected[lang]
    definition classes: AnyRef
  26. def collect [B, That] (pf: PartialFunction[(String, B), B])(implicit bf: CanBuildFrom[Map[String, B], B, That]) : That

    definition classes: TraversableLike
  27. def companion : GenericCompanion[Iterable]

    definition classes: Iterable → Traversable → GenericTraversableTemplate
  28. def compose [A] (g: (A) ⇒ String) : (A) ⇒ B

    definition classes: Function1
  29. def contains (key: String) : Boolean

    definition classes: MapLike
  30. def copyToArray [B >: A] (xs: Array[B], start: Int, len: Int) : Unit

    definition classes: IterableLike → TraversableLike → TraversableOnce
  31. def copyToArray [B >: A] (xs: Array[B]) : Unit

    definition classes: TraversableOnce
  32. def copyToArray [B >: A] (xs: Array[B], start: Int) : Unit

    definition classes: TraversableOnce
  33. def copyToBuffer [B >: A] (dest: Buffer[B]) : Unit

    definition classes: TraversableOnce
  34. def count (p: ((String, B)) ⇒ Boolean) : Int

    definition classes: TraversableOnce
  35. def default (key: String) : B

    definition classes: MapLike
  36. def drop (n: Int) : Map[String, B]

    definition classes: TraversableLike
  37. def dropRight (n: Int) : Map[String, B]

    definition classes: IterableLike
  38. def dropWhile (p: ((String, B)) ⇒ Boolean) : Map[String, B]

    definition classes: TraversableLike
  39. def elements : Iterator[(String, B)]

    definition classes: IterableLike
      deprecated:
    1. use iterator' instead

  40. def empty : Map[String, B]

    definition classes: Map → MapLike
  41. def eq (arg0: AnyRef) : Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

    The eq method implements an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation] on non-null instances of AnyRef: * It is reflexive: for any non-null instance x of type AnyRef, x.eq(x) returns true. * It is symmetric: for any non-null instances x and y of type AnyRef, x.eq(y) returns true if and only if y.eq(x) returns true. * It is transitive: for any non-null instances x, y, and z of type AnyRef if x.eq(y) returns true and y.eq(z) returns true, then x.eq(z) returns true.

    Additionally, the eq method has three other properties. * It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false. * For any non-null instance 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).

    arg0

    the object to compare against this object for reference equality.

    returns

    true if the argument is a reference to the receiver object; false otherwise.

    attributes: final
    definition classes: AnyRef
  42. def equals (that: Any) : Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

    The default implementations of this method is an [http://en.wikipedia.org/wiki/Equivalence_relation equivalence relation]: * It is reflexive: for any instance x of type Any, x.equals(x) should return true. * It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true. * It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

    If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same scala.Int (o1.hashCode.equals(o2.hashCode)).

    returns

    true if the receiver object is equivalent to the argument; false otherwise.

    definition classes: MapLike → Equals → AnyRef → Any
  43. def exists (p: ((String, B)) ⇒ Boolean) : Boolean

    definition classes: IterableLike → TraversableLike → TraversableOnce
  44. def filter (p: ((String, B)) ⇒ Boolean) : Map[String, B]

    definition classes: TraversableLike
  45. def filterKeys (p: (String) ⇒ Boolean) : Map[String, B]

    definition classes: MapLike
  46. def filterNot (p: ((String, B)) ⇒ Boolean) : Map[String, B]

    definition classes: MapLike → TraversableLike
  47. def finalize () : Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

    The details of when and if the finalize method are invoked, as well as the interaction between finalizeand non-local returns and exceptions, are all platform dependent.

    attributes: protected[lang]
    definition classes: AnyRef
  48. def find (p: ((String, B)) ⇒ Boolean) : Option[(String, B)]

    definition classes: IterableLike → TraversableLike → TraversableOnce
  49. def first : (String, B)

    definition classes: IterableLike
      deprecated:
    1. use head' instead

  50. def firstOption : Option[(String, B)]

    definition classes: IterableLike
      deprecated:
    1. use headOption' instead

  51. def flatMap [B, That] (f: ((String, B)) ⇒ Traversable[B])(implicit bf: CanBuildFrom[Map[String, B], B, That]) : That

    definition classes: TraversableLike → FilterMonadic
  52. def flatten [B] (implicit asTraversable: ((String, B)) ⇒ Traversable[B]) : Iterable[B]

    definition classes: GenericTraversableTemplate
  53. def foldLeft [B] (z: B)(op: (B, (String, B)) ⇒ B) : B

    definition classes: TraversableOnce
  54. def foldRight [B] (z: B)(op: ((String, B), B) ⇒ B) : B

    definition classes: IterableLike → TraversableOnce
  55. def forall (p: ((String, B)) ⇒ Boolean) : Boolean

    definition classes: IterableLike → TraversableLike → TraversableOnce
  56. def foreach [U] (f: ((String, B)) ⇒ U) : Unit

    definition classes: IterableLike → TraversableLike → TraversableOnce → FilterMonadic
  57. def genericBuilder [B] : Builder[B, Iterable[B]]

    definition classes: GenericTraversableTemplate
  58. def get (key: Symbol) : Option[B]

  59. def get (key: String) : Option[B]

    attributes: abstract
    definition classes: MapLike
  60. def getClass () : java.lang.Class[_]

    Returns a representation that corresponds to the dynamic class of the receiver object.

    Returns a representation that corresponds to the dynamic class of the receiver object.

    The nature of the representation is platform dependent.

    returns

    a representation that corresponds to the dynamic class of the receiver object.

    attributes: final
    definition classes: AnyRef
  61. def getOrElse [B1 >: B] (key: Symbol, default: ⇒ B1) : B1

  62. def getOrElse [B1 >: B] (key: String, default: ⇒ B1) : B1

    definition classes: MapLike
  63. def groupBy [K] (f: ((String, B)) ⇒ K) : Map[K, Map[String, B]]

    definition classes: TraversableLike
  64. def grouped (size: Int) : Iterator[Map[String, B]]

    definition classes: IterableLike
  65. def hasDefiniteSize : Boolean

    definition classes: TraversableLike → TraversableOnce
  66. def hashCode () : Int

    Returns a hash code value for the object.

    Returns a hash code value for the object.

    The default hashing algorithm is platform dependent.

    Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

    returns

    the hash code value for the object.

    definition classes: MapLike → AnyRef → Any
  67. def head : (String, B)

    definition classes: IterableLike → TraversableLike
  68. def headOption : Option[(String, B)]

    definition classes: TraversableLike
  69. def init : Map[String, B]

    definition classes: TraversableLike
  70. def isDefinedAt (key: String) : Boolean

    definition classes: MapLike → PartialFunction
  71. def isEmpty : Boolean

    definition classes: MapLike → IterableLike → TraversableLike → TraversableOnce
  72. def isInstanceOf [T0] : Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

    This method is used to test whether the dynamic type of the receiver object is T0.

    Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression1.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 requested typed.

    returns

    true if the receiver object is an instance of erasure of type T0; false otherwise.

    attributes: final
    definition classes: Any
  73. def isTraversableAgain : Boolean

    attributes: final
    definition classes: TraversableLike → TraversableOnce
  74. def iterator : Iterator[(String, B)]

    attributes: abstract
    definition classes: MapLike → IterableLike
  75. def keySet : Set[String]

    definition classes: MapLike
  76. def keys : Iterable[String]

    definition classes: MapLike
  77. def keysIterator : Iterator[String]

    definition classes: MapLike
  78. def last : (String, B)

    definition classes: TraversableLike
  79. def lastOption : Option[(String, B)]

    definition classes: TraversableLike
  80. def lift : (String) ⇒ Option[B]

    definition classes: PartialFunction
  81. def map [B, That] (f: ((String, B)) ⇒ B)(implicit bf: CanBuildFrom[Map[String, B], B, That]) : That

    definition classes: TraversableLike → FilterMonadic
  82. def mapElements [C] (f: (B) ⇒ C) : Map[String, C]

    definition classes: MapLike
      deprecated:
    1. use mapValues' instead

  83. def mapValues [C] (f: (B) ⇒ C) : Map[String, C]

    definition classes: MapLike
  84. def max [B >: A] (implicit cmp: Ordering[B]) : (String, B)

    definition classes: TraversableOnce
  85. def min [B >: A] (implicit cmp: Ordering[B]) : (String, B)

    definition classes: TraversableOnce
  86. def mkString : String

    definition classes: TraversableOnce
  87. def mkString (sep: String) : String

    definition classes: TraversableOnce
  88. def mkString (start: String, sep: String, end: String) : String

    definition classes: TraversableOnce
  89. def ne (arg0: AnyRef) : Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

    o.ne(arg0) is the same as !(o.eq(arg0)).

    arg0

    the object to compare against this object for reference dis-equality.

    returns

    false if the argument is not a reference to the receiver object; true otherwise.

    attributes: final
    definition classes: AnyRef
  90. def newBuilder : Builder[(String, B), Map[String, B]]

    attributes: protected[this]
    definition classes: MapLike → TraversableLike → HasNewBuilder
  91. def nonEmpty : Boolean

    definition classes: TraversableOnce
  92. def notify () : Unit

    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.

    attributes: final
    definition classes: AnyRef
  93. def notifyAll () : Unit

    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.

    attributes: final
    definition classes: AnyRef
  94. def orElse [A1 <: A, B1 >: B] (that: PartialFunction[A1, B1]) : PartialFunction[A1, B1]

    definition classes: PartialFunction
  95. def partition (p: ((String, B)) ⇒ Boolean) : (Map[String, B], Map[String, B])

    definition classes: TraversableLike
  96. def product [B >: A] (implicit num: Numeric[B]) : B

    definition classes: TraversableOnce
  97. def projection : IterableView[(String, B), Map[String, B]]

    definition classes: IterableLike
      deprecated:
    1. use view' instead

  98. def reduceLeft [B >: A] (op: (B, (String, B)) ⇒ B) : B

    definition classes: TraversableOnce
  99. def reduceLeftOption [B >: A] (op: (B, (String, B)) ⇒ B) : Option[B]

    definition classes: TraversableOnce
  100. def reduceRight [B >: A] (op: ((String, B), B) ⇒ B) : B

    definition classes: IterableLike → TraversableOnce
  101. def reduceRightOption [B >: A] (op: ((String, B), B) ⇒ B) : Option[B]

    definition classes: TraversableOnce
  102. def repr : Map[String, B]

    definition classes: TraversableLike
  103. def reversed : List[(String, B)]

    attributes: protected[this]
    definition classes: TraversableOnce
  104. def sameElements [B >: A] (that: Iterable[B]) : Boolean

    definition classes: IterableLike
  105. def scanLeft [B, That] (z: B)(op: (B, (String, B)) ⇒ B)(implicit bf: CanBuildFrom[Map[String, B], B, That]) : That

    definition classes: TraversableLike
  106. def scanRight [B, That] (z: B)(op: ((String, B), B) ⇒ B)(implicit bf: CanBuildFrom[Map[String, B], B, That]) : That

    definition classes: TraversableLike
  107. def size : Int

    definition classes: TraversableOnce
  108. def slice (from: Int, until: Int) : Map[String, B]

    definition classes: IterableLike → TraversableLike
  109. def sliding [B >: A] (size: Int, step: Int) : Iterator[Map[String, B]]

    definition classes: IterableLike
  110. def sliding [B >: A] (size: Int) : Iterator[Map[String, B]]

    definition classes: IterableLike
  111. def span (p: ((String, B)) ⇒ Boolean) : (Map[String, B], Map[String, B])

    definition classes: TraversableLike
  112. def splitAt (n: Int) : (Map[String, B], Map[String, B])

    definition classes: TraversableLike
  113. def stringPrefix : String

    definition classes: MapLike → TraversableLike
  114. def sum [B >: A] (implicit num: Numeric[B]) : B

    definition classes: TraversableOnce
  115. def synchronized [T0] (arg0: T0) : T0

    attributes: final
    definition classes: AnyRef
  116. def tail : Map[String, B]

    definition classes: TraversableLike
  117. def take (n: Int) : Map[String, B]

    definition classes: IterableLike → TraversableLike
  118. def takeRight (n: Int) : Map[String, B]

    definition classes: IterableLike
  119. def takeWhile (p: ((String, B)) ⇒ Boolean) : Map[String, B]

    definition classes: IterableLike → TraversableLike
  120. def thisCollection : Iterable[(String, B)]

    attributes: protected[this]
    definition classes: IterableLike → TraversableLike
  121. def toArray [B >: A] (implicit arg0: ClassManifest[B]) : Array[B]

    definition classes: TraversableOnce
  122. def toBuffer [B >: A] : Buffer[B]

    definition classes: TraversableOnce
  123. def toCollection (repr: Map[String, B]) : Iterable[(String, B)]

    attributes: protected[this]
    definition classes: IterableLike → TraversableLike
  124. def toIndexedSeq [B >: A] : IndexedSeq[B]

    definition classes: TraversableOnce
  125. def toIterable : Iterable[(String, B)]

    definition classes: IterableLike → TraversableOnce
  126. def toIterator : Iterator[(String, B)]

    definition classes: TraversableLike → TraversableOnce
  127. def toList : List[(String, B)]

    definition classes: TraversableOnce
  128. def toMap [T, U] (implicit ev: <:<[(String, B), (T, U)]) : Map[T, U]

    definition classes: TraversableOnce
  129. def toSeq : Seq[(String, B)]

    definition classes: IterableLike → TraversableOnce
  130. def toSet [B >: A] : Set[B]

    definition classes: TraversableOnce
  131. def toStream : Stream[(String, B)]

    definition classes: IterableLike → TraversableLike → TraversableOnce
  132. def toString () : String

    Returns a string representation of the object.

    Returns a string representation of the object.

    The default representation is platform dependent.

    returns

    a string representation of the object.

    definition classes: MapLike → TraversableLike → Function1 → AnyRef → Any
  133. def toTraversable : Traversable[(String, B)]

    definition classes: TraversableLike → TraversableOnce
  134. def transpose [B] (implicit asTraversable: ((String, B)) ⇒ Traversable[B]) : Iterable[Iterable[B]]

    definition classes: GenericTraversableTemplate
  135. def unzip [A1, A2] (implicit asPair: ((String, B)) ⇒ (A1, A2)) : (Iterable[A1], Iterable[A2])

    definition classes: GenericTraversableTemplate
  136. def updated [B1 >: B] (key: String, value: B1) : Map[String, B1]

    definition classes: MapLike
  137. def values : Iterable[B]

    definition classes: MapLike
  138. def valuesIterator : Iterator[B]

    definition classes: MapLike
  139. def view (from: Int, until: Int) : IterableView[(String, B), Map[String, B]]

    definition classes: IterableLike → TraversableLike
  140. def view : IterableView[(String, B), Map[String, B]]

    definition classes: IterableLike → TraversableLike
  141. def wait () : Unit

    attributes: final
    definition classes: AnyRef
  142. def wait (arg0: Long, arg1: Int) : Unit

    attributes: final
    definition classes: AnyRef
  143. def wait (arg0: Long) : Unit

    attributes: final
    definition classes: AnyRef
  144. def withFilter (p: ((String, B)) ⇒ Boolean) : FilterMonadic[(String, B), Map[String, B]]

    definition classes: TraversableLike → FilterMonadic
  145. def zip [A1 >: A, B, That] (that: Iterable[B])(implicit bf: CanBuildFrom[Map[String, B], (A1, B), That]) : That

    definition classes: IterableLike
  146. def zipAll [B, A1 >: A, That] (that: Iterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Map[String, B], (A1, B), That]) : That

    definition classes: IterableLike
  147. def zipWithIndex [A1 >: A, That] (implicit bf: CanBuildFrom[Map[String, B], (A1, Int), That]) : That

    definition classes: IterableLike

Inherited from Map[String, B]

Inherited from MapLike[String, B, Map[String, B]]

Inherited from Subtractable[String, Map[String, B]]

Inherited from PartialFunction[String, B]

Inherited from (String) ⇒ B

Inherited from Iterable[(String, B)]

Inherited from IterableLike[(String, B), Map[String, B]]

Inherited from Equals

Inherited from Traversable[(String, B)]

Inherited from GenericTraversableTemplate[(String, B), Iterable]

Inherited from TraversableLike[(String, B), Map[String, B]]

Inherited from TraversableOnce[(String, B)]

Inherited from FilterMonadic[(String, B), Map[String, B]]

Inherited from HasNewBuilder[(String, B), Map[String, B]]

Inherited from AnyRef

Inherited from Any