Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalactic
    Definition Classes
    org
  • trait NormMethods extends AnyRef

    Provides an implicit conversion that allows norm to be invoked on any value of type T for which an implicit Normalization[T] exists.

    Provides an implicit conversion that allows norm to be invoked on any value of type T for which an implicit Normalization[T] exists.

    Here's an example:

    scala> import org.scalactic._
    import org.scalactic._
    
    scala> import StringNormalizations._
    import StringNormalizations._
    
    scala> implicit val stringNormalization = lowerCased and trimmed
    stringNormalization: org.scalactic.Uniformity[String] = org.scalactic.Uniformity$$anon$1@19ba67ec
    
    scala> import NormMethods._
    import NormMethods._
    
    scala> val s = " There "
    s: String = " There "
    
    scala> "Hey " + s + "!"
    res5: String = Hey  There !
    
    scala> "Hey " + s.norm + "!"
    res6: String = Hey there!
    

    Definition Classes
    scalactic
  • Normalizer
Scalactic is brought to you by:

final class Normalizer[T] extends AnyRef

Class containing a norm method that normalizes the given object o of type T via the implicitly passed Normalization[T].

Source
NormMethods.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Normalizer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Normalizer(o: T)(implicit normalization: Normalization[T])

Value Members

  1. def norm: T

    Normalizes the object o of type T via the implicitly passed Normalization[T] passed to the constructor of this Normalizer.

    Normalizes the object o of type T via the implicitly passed Normalization[T] passed to the constructor of this Normalizer.

    returns

    a normalized form of o