net.liftweb.util

Helpers

object Helpers extends TimeHelpers with StringHelpers with ListHelpers with SecurityHelpers with BindHelpers with HttpHelpers with IoHelpers with BasicTypesHelpers with ClassHelpers with ControlHelpers

The Helpers object provides a lot of utility functions:

linear super types: ControlHelpers, ClassHelpers, BasicTypesHelpers, IoHelpers, HttpHelpers, BindHelpers, SecurityHelpers, ListHelpers, StringHelpers, TimeHelpers, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Helpers
  2. ControlHelpers
  3. ClassHelpers
  4. BasicTypesHelpers
  5. IoHelpers
  6. HttpHelpers
  7. BindHelpers
  8. SecurityHelpers
  9. ListHelpers
  10. StringHelpers
  11. TimeHelpers
  12. AnyRef
  13. Any
Visibility
  1. Public
  2. All
Impl.
  1. Concrete
  2. Abstract

Type Members

  1. class AttrBindParam extends BindParam with BindWithAttr

    BindParam that binds a given value into a new attribute.

  2. trait BindParam extends AnyRef

    Base class for Bind parameters.

  3. class BindParamAssoc extends AnyRef

    This class creates a BindParam from an input value

  4. trait BindWithAttr extends AnyRef

    A trait that indicates what the newly bound attribute name should be.

  5. class Boolean2 extends AnyRef

    This decorator class adds a ternary operator to a Boolean value

  6. class BooleanBindParam extends (String, Boolean) with BindParam

    attributes: final
  7. class BoxBindParam extends (String, Box[NodeSeq]) with BindParam

    attributes: final
  8. class CalendarExtension extends AnyRef

    This class adds the setXXX methods to the Calendar class.

  9. class DateExtension extends AnyRef

    This class adds a noTime method the Date class, in order to get at Date object starting at 00:00

  10. class FuncAttrBindParam extends BindParam with BindWithAttr

    BindParam that computes a new attribute value based on the current attribute value.

  11. class FuncAttrBoxBindParam extends BindParam with BindWithAttr

    BindParam that computes an optional new attribute value based on the current attribute value.

  12. class FuncAttrOptionBindParam extends BindParam with BindWithAttr

    BindParam that computes an optional new attribute value based on the current attribute value.

  13. class FuncBindParam extends (String, (NodeSeq) ⇒ NodeSeq) with BindParam

    BindParam using a function to calculate its value

  14. class IntBindParam extends (String, Int) with BindParam

    attributes: final
  15. class ListMapish extends AnyRef

    This class add a case insensitive get to a List of Pairs of String, as if it was a Map

  16. class LongBindParam extends (String, Long) with BindParam

    attributes: final
  17. class OptionBindParam extends (String, Option[NodeSeq]) with BindParam

    attributes: final
  18. case class PrefixedBindWithAttr (prefix: String, binding: BindParam with BindWithAttr) extends BindParam with BindWithAttr with Product

    A case class that wraps attribute-oriented BindParams to allow prefixing the resulting attribute

  19. class SuperArrowAssoc extends AnyRef

  20. class SuperList [T] extends AnyRef

    Add utility methods to Lists

  21. class SymbolBindParam extends (String, Symbol) with BindParam

    attributes: final
  22. class TheBindParam extends (String, NodeSeq) with BindParam

    Constant BindParam always returning the same value

  23. class TheBindableBindParam [T <: Bindable] extends (String, T) with BindParam

    attributes: final
  24. class TheStrBindParam extends (String, String) with BindParam

    Constant BindParam always returning the same value

  25. class TimeSpan extends ConvertableToDate

    The TimeSpan class represents an amount of time.

  26. case class TimeSpanBuilder (len: Long) extends Product

    class building TimeSpans given an amount (len) and a method specify the time unit

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 == (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
  7. 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
  8. object AsBoolean extends AnyRef

    A helpful Boolean extractor

  9. object AsDouble extends AnyRef

    A helpful Int extractor

  10. object AsInt extends AnyRef

    A helpful Int extractor

  11. object AsLong extends AnyRef

    A helpful Long extractor

  12. object AttrBindParam extends AnyRef

    BindParam that binds a given value into a new attribute.

  13. object BindParamAssoc extends AnyRef

    transforms a Box into a Text node

  14. object BooleanBindParam extends AnyRef

  15. object BoxBindParam extends AnyRef

  16. object FuncAttrBindParam extends AnyRef

    BindParam using a function to calculate its value.

  17. object FuncAttrBoxBindParam extends AnyRef

    BindParam that computes an optional new attribute value based on the current attribute value.

  18. object FuncAttrOptionBindParam extends AnyRef

    BindParam that computes an optional new attribute value based on the current attribute value.

  19. object FuncBindParam extends AnyRef

  20. object IntBindParam extends AnyRef

  21. object LongBindParam extends AnyRef

  22. object OptionBindParam extends AnyRef

  23. object SymbolBindParam extends AnyRef

  24. object TheBindParam extends AnyRef

  25. object TheBindableBindParam extends AnyRef

  26. object TheStrBindParam extends AnyRef

  27. object TimeSpan extends AnyRef

    The TimeSpan object provides class represents an amount of time.

  28. def ^ [T] (i: T*) : List[T]

    This operator transforms its arguments into a List

    This operator transforms its arguments into a List

    returns

    the list of arguments passed as varargs

    definition classes: ClassHelpers
  29. def addAttributes (in: NodeSeq, attributes: MetaData) : NodeSeq

    takes a NodeSeq and applies all the attributes to all the Elems at the top level of the NodeSeq.

    takes a NodeSeq and applies all the attributes to all the Elems at the top level of the NodeSeq. The id attribute is applied to the first-found Elem only

    definition classes: BindHelpers
  30. def addCssClass (cssClass: String, elem: Elem) : Elem

    Adds a css class to the existing class tag of an Elem or create the class attribute

    Adds a css class to the existing class tag of an Elem or create the class attribute

    definition classes: BindHelpers
  31. def addCssClass (cssClass: Box[String], elem: Elem) : Elem

    Adds a css class to the existing class tag of an Elem or create the class attribute

    Adds a css class to the existing class tag of an Elem or create the class attribute

    definition classes: BindHelpers
  32. def appendFuncToURL (url: String, funcStr: String) : String

    Given a URL and a Lift function String, append the function even if the URL has query params and a #

    Given a URL and a Lift function String, append the function even if the URL has query params and a #

    definition classes: HttpHelpers
  33. def appendParams (url: String, params: Seq[(String, String)]) : String

    Append parameters to a URL

    Append parameters to a URL

    url

    the url to append the params to

    params

    the parameters (name/value) to append to the URL

    returns

    the url with the parameters appended

    definition classes: HttpHelpers
  34. def appendQueryParameters (url: String, params: List[(String, String)]) : String

    Given a list of query parameters, append them to the URL taking into account # and if there are any other query parameters

    Given a list of query parameters, append them to the URL taking into account # and if there are any other query parameters

    definition classes: HttpHelpers
  35. def asBoolean (in: String) : Box[Boolean]

    A helper that will convert the String to a Boolean if it's t, true, yes, 1, f, false, no, or 0

    A helper that will convert the String to a Boolean if it's t, true, yes, 1, f, false, no, or 0

    definition classes: BasicTypesHelpers
  36. def asDouble (in: String) : Box[Double]

    Safely convert the specified String to an Int.

    Safely convert the specified String to an Int.

    definition classes: BasicTypesHelpers
  37. 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
  38. def asInt (in: String) : Box[Int]

    Safely convert the specified String to an Int.

    Safely convert the specified String to an Int.

    definition classes: BasicTypesHelpers
  39. def asLong (in: Any) : Box[Long]

    Convert any object to an "equivalent" Long depending on its value

    Convert any object to an "equivalent" Long depending on its value

    definition classes: BasicTypesHelpers
  40. def asLong (in: String) : Box[Long]

    Safely convert the specified String to a Long.

    Safely convert the specified String to a Long.

    definition classes: BasicTypesHelpers
  41. def base64Decode (in: String) : Array[Byte]

    decode a String in Base 64

    decode a String in Base 64

    definition classes: SecurityHelpers
  42. def base64Encode (in: Array[Byte]) : String

    encode a Byte array in Base 64

    encode a Byte array in Base 64

    definition classes: SecurityHelpers
  43. def base64EncodeURLSafe (in: Array[Byte]) : String

    encode a Byte array in Base 64 in a way that's safe for use in URLs

    encode a Byte array in Base 64 in a way that's safe for use in URLs

    definition classes: SecurityHelpers
  44. def bind (vals: Map[String, NodeSeq], xml: NodeSeq) : NodeSeq

    Replace the content of lift:bind nodes with the corresponding nodes found in a map, according to the value of the "name" attribute.

    Replace the content of lift:bind nodes with the corresponding nodes found in a map, according to the value of the "name" attribute.

    Usage:

      bind(Map("a" ->

    ), <lift:bind name

    )

    vals

    map of name/nodes to replace

    xml

    nodes containing lift:bind nodes

    returns

    the NodeSeq that results from the specified transforms

    definition classes: BindHelpers
  45. def bind (namespace: String, nodeFailureXform: Box[(NodeSeq) ⇒ NodeSeq], paramFailureXform: Box[(PrefixedAttribute) ⇒ MetaData], preserveScope: Boolean, xml: NodeSeq, params: BindParam*) : NodeSeq

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    For example:

      bind("user",
           Full(xhtml: NodeSeq => Text("Default Value")),
           Empty,
           <user:hello>replace this</user:hello><user:dflt>replace with default</user:dflt>,
           "hello" ->

    )

    will return

    Default Value

    namespace

    the namespace of tags to bind

    nodeFailureXform

    a box containing the function to use as the default transform for tags in the specified namespace that do not have bindings specified.

    paramFailureXform

    a box containing the function to use as the default transform for unrecognized attributes in bound elements.

    xml

    the NodeSeq in which to find elements to be bound.

    params

    the list of BindParam bindings to be applied

    returns

    the NodeSeq that results from the specified transforms

    definition classes: BindHelpers
  46. def bind (namespace: String, nodeFailureXform: Box[(NodeSeq) ⇒ NodeSeq], paramFailureXform: Box[(PrefixedAttribute) ⇒ MetaData], xml: NodeSeq, params: BindParam*) : NodeSeq

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    Bind a set of values to parameters and attributes in a block of XML with defined transforms for unbound elements within the specified namespace.

    For example:

      bind("user",
           Full(xhtml: NodeSeq => Text("Default Value")),
           Empty,
           <user:hello>replace this</user:hello><user:dflt>replace with default</user:dflt>,
           "hello" ->

    )

    will return

    Default Value

    namespace

    the namespace of tags to bind

    nodeFailureXform

    a box containing the function to use as the default transform for tags in the specified namespace that do not have bindings specified.

    paramFailureXform

    a box containing the function to use as the default transform for unrecognized attributes in bound elements.

    xml

    the NodeSeq in which to find elements to be bound.

    params

    the list of BindParam bindings to be applied

    returns

    the NodeSeq that results from the specified transforms

    definition classes: BindHelpers
  47. def bind (namespace: String, xml: NodeSeq, params: BindParam*) : NodeSeq

    Bind a set of values to parameters and attributes in a block of XML.

    Bind a set of values to parameters and attributes in a block of XML.

    For example:

      bind("user", <user:hello>replace this</user:hello>, "hello" ->

    )

    will return

    namespace

    the namespace of tags to bind

    xml

    the NodeSeq in which to find elements to be bound.

    params

    the list of BindParam bindings to be applied

    returns

    the NodeSeq that results from the specified transforms

    definition classes: BindHelpers
  48. def bindlist (listvals: List[Map[String, NodeSeq]], xml: NodeSeq) : Box[NodeSeq]

    Bind a list of name/xml maps to a block of XML containing lift:bind nodes (see the bind(Map, NodeSeq) function)

    Bind a list of name/xml maps to a block of XML containing lift:bind nodes (see the bind(Map, NodeSeq) function)

    returns

    the NodeSeq that results from the specified transforms

    definition classes: BindHelpers
  49. implicit def boolean2 (b: ⇒ Boolean) : Boolean2

    Allows an implicit transform from a Boolean to a Boolean2, allowing expressions such as:(1 == 2) ? "a" | "b" (This expression will return "b")

    Allows an implicit transform from a Boolean to a Boolean2, allowing expressions such as:(1 == 2) ? "a" | "b" (This expression will return "b")

    b

    the predicate to be tested by the ternary operator.

    attributes: implicit
    definition classes: BasicTypesHelpers
  50. def boxParseInternetDate (dateString: String) : Box[Date]

    returns

    a date from a string using the internet format. Return the Epoch date if the parse is unsuccesfull

    definition classes: TimeHelpers
  51. def calcTime [T] (f: ⇒ T) : (Long, T)

    returns

    the time taken to evaluate f in millis and the result

    definition classes: TimeHelpers
  52. def callableMethod_? (meth: Method) : Boolean

    returns

    true if the method is public and has no parameters

    definition classes: ClassHelpers
  53. def camelCase (name: String) : String

    definition classes: ClassHelpers
      deprecated:
    1. Use StringHelpers.camelify

  54. def camelCaseMethod (name: String) : String

    definition classes: ClassHelpers
      deprecated:
    1. Use StringHelpers.camelifyMethod

  55. def camelify (name: String) : String

    Turns a string of format "foo_bar" into camel case "FooBar"

    Turns a string of format "foo_bar" into camel case "FooBar"

    Functional code courtesy of Jamie Webb (j@jmawebb.cjb.net) 2006/11/28

    name

    the String to CamelCase

    returns

    the CamelCased string

    definition classes: StringHelpers
  56. def camelifyMethod (name: String) : String

    Turn a string of format "foo_bar" into camel case with the first letter in lower case: "fooBar" This function is especially used to camelCase method names.

    Turn a string of format "foo_bar" into camel case with the first letter in lower case: "fooBar" This function is especially used to camelCase method names.

    name

    the String to CamelCase

    returns

    the CamelCased string

    definition classes: StringHelpers
  57. def capify (in: String) : String

    Capitalize every "word" in the string.

    Capitalize every "word" in the string. A word is either separated by spaces or underscores.

    in

    string to capify

    returns

    the capified string

    definition classes: StringHelpers
  58. def charSplit (what: String, sep: Char) : List[String]

    Faster than roboSplit.

    Faster than roboSplit... this method splits Strings at a given character

    definition classes: StringHelpers
  59. def chooseTemplate (prefix: String, tag: String, xhtml: NodeSeq) : NodeSeq

    Finds and returns one of many templates from the children based upon the namespace and tag name: for example, for prefix "choose" and tag name "stuff" this would return the contents of the first tag <choose:stuff> ... </choose:stuff>in the specified NodeSeq.

    Finds and returns one of many templates from the children based upon the namespace and tag name: for example, for prefix "choose" and tag name "stuff" this would return the contents of the first tag <choose:stuff> ... </choose:stuff>in the specified NodeSeq.

    prefix

    the prefix (e.g., "choose")

    tag

    the tag to choose (e.g., "stuff")

    xhtml

    the node sequence to search for the specified element

    returns

    the first matching node sequence

    definition classes: BindHelpers
  60. def classHasControllerMethod (clz: Class[_], name: String) : Boolean

    Check that the method 'name' is callable for class 'clz'

    Check that the method 'name' is callable for class 'clz'

    clz

    the class supposed to own the method

    name

    name of the method to test

    returns

    true if the method exists on the class and is callable

    definition classes: ClassHelpers
  61. def classHierarchy (in: Class[_]) : List[Class[_]]

    definition classes: ClassHelpers
  62. def clean (in: String) : String

    Remove all the characters from a string exception a-z, A-Z, 0-9, and '_'

    Remove all the characters from a string exception a-z, A-Z, 0-9, and '_'

    returns

    the cleaned string and an empty string if the input is null

    definition classes: StringHelpers
  63. 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
    definition classes: AnyRef
  64. def commafy (what: String) : String

    Add commas before the last 3 characters

    Add commas before the last 3 characters

    returns

    the string with commas

    definition classes: StringHelpers
  65. def containsClass [C] (clz: Class[C], toMatch: List[Class[_]]) : Boolean

    Is the clz an instance of (assignable from) any of the classes in the list

    Is the clz an instance of (assignable from) any of the classes in the list

    clz

    the class to test

    toMatch

    the list of classes to match against

    returns

    true if clz is assignable from any of the matching classes

    definition classes: ClassHelpers
  66. def couldBeHtml (in: Map[String, String]) : Boolean

    Given a map of HTTP properties, return true if the "Content-type" value in the map is either "text/html" or "application/xhtml+xml"

    Given a map of HTTP properties, return true if the "Content-type" value in the map is either "text/html" or "application/xhtml+xml"

    in

    Map which may contain a key named Content-Type

    returns

    true if there is a pair ("Content-Type", "text/html") or ("Content-Type", "application/xhtml+xml")

    definition classes: HttpHelpers
  67. def createInvoker [C <: AnyRef] (name: String, on: C) : Box[() ⇒ Box[Any]]

    Create a function (the 'invoker') which will trigger any public, parameterless method That function will throw the cause exception if the method can't be invoked

    Create a function (the 'invoker') which will trigger any public, parameterless method That function will throw the cause exception if the method can't be invoked

    on

    instance whose method must be invoked

    returns

    Empty if instance is null or Full(invoker)

    definition classes: ClassHelpers
  68. implicit def cssSelectorToCssBindPromoter (sel: CssSelector) : ToCssBindPromoter

    promote a String to a ToCssBindPromotor

    promote a String to a ToCssBindPromotor

    attributes: implicit
    definition classes: BindHelpers
  69. def currentYear : Int

    returns

    the current year

    definition classes: TimeHelpers
  70. def dateFormatter : SimpleDateFormat

    returns

    a standard format for the date yyyy/MM/dd

    definition classes: TimeHelpers
  71. def day (in: Date) : Int

    returns

    the day of month corresponding to the input date (1 based)

    definition classes: TimeHelpers
  72. def dayNow : Date

    returns

    the current Day as a Date object

    definition classes: TimeHelpers
      deprecated:
    1. use today instead

  73. def days (in: Long) : Long

    returns

    the number of millis corresponding to 'in' days

    definition classes: TimeHelpers
  74. def daysSinceEpoch : Long

    returns

    the number of days since epoch

    definition classes: TimeHelpers
  75. def deepEnsureUniqueId (in: NodeSeq) : NodeSeq

    For a list of NodeSeq, ensure that the the id of the root Elems are unique.

    For a list of NodeSeq, ensure that the the id of the root Elems are unique. If there's a duplicate, that Elem will be returned without an id

    definition classes: BindHelpers
  76. def deepFindKids (in: NodeSeq, prefix: String, label: String) : NodeSeq

    definition classes: HttpHelpers
  77. def delta [T, Res] (old: Seq[T], newList: Seq[T])(f: (DeltaInfo[T]) ⇒ Res) : List[Res]

    Compute the deltas between two sequences of a given type.

    Compute the deltas between two sequences of a given type. Apply the function based on the differences between the two lists. The resulting List of commands will be returned. The algorithm used to calculate the diffs is not very efficient and can degrade to O(n2), so it's not great for large collections. Internally the Seq[T] are converted to a List[T]. Finally, it's highly recommended that T be immutable and does proper equals testing (e.g., a case class).

    definition classes: ListHelpers
  78. def delta [T, Res] (old: Box[Seq[T]], newList: Seq[T])(f: (DeltaInfo[T]) ⇒ Res) : List[Res]

    Compute the deltas between two sequences of a given type.

    Compute the deltas between two sequences of a given type. Apply the function based on the differences between the two lists. The resulting List of commands will be returned.

    definition classes: ListHelpers
  79. def doClose [T] (is: Closeable*)(f: ⇒ T) : T

    Executes by-name function f and then closes the Cloaseables parameters

    Executes by-name function f and then closes the Cloaseables parameters

    definition classes: IoHelpers
  80. def emptyForNull (s: String) : String

    Test for null and return either the given String if not null or the empty String.

    Test for null and return either the given String if not null or the empty String.

    definition classes: StringHelpers
  81. def encJs (what: String) : String

    Encode the string to be including in JavaScript, replacing '\' or '\\' or non-ASCII characters by their unicode value

    Encode the string to be including in JavaScript, replacing '\' or '\\' or non-ASCII characters by their unicode value

    returns

    the encoded string inserted into quotes

    definition classes: StringHelpers
  82. def ensureId (ns: NodeSeq, id: String) : NodeSeq

    Ensure that the first Element has the specified ID

    Ensure that the first Element has the specified ID

    definition classes: BindHelpers
  83. def ensureUniqueId (in: Seq[NodeSeq]) : Seq[NodeSeq]

    For a list of NodeSeq, ensure that the the id of the root Elems are unique.

    For a list of NodeSeq, ensure that the the id of the root Elems are unique. If there's a duplicate, that Elem will be returned without an id

    definition classes: BindHelpers
  84. def enumToList [T] (enum: Enumeration[T]) : List[T]

    Convert a java.

    Convert a java.util.Enumeration to a List[T]

    definition classes: ListHelpers
  85. def enumToStringList [C] (enum: Enumeration[C]) : List[String]

    Convert a java.

    Convert a java.util.Enumeration to a List[String] using the toString method on each element

    definition classes: ListHelpers
  86. 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
  87. def equals (arg0: 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)).

    arg0

    the object to compare against this object for equality.

    returns

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

    definition classes: AnyRef → Any
  88. def errorDiv (body: NodeSeq) : Box[NodeSeq]

    definition classes: BindHelpers
  89. def escChar (in: Char) : String

    Create the unicode value of a character

    Create the unicode value of a character

    in

    character

    returns

    the unicode value as a string starting by \\u

    definition classes: StringHelpers
  90. def evalElemWithId (f: (String, Elem) ⇒ NodeSeq)(ns: NodeSeq) : NodeSeq

    Within a NodeSeq, find the first elem and run it through the function.

    Within a NodeSeq, find the first elem and run it through the function. Return the resulting NodeSeq

    definition classes: HttpHelpers
  91. def exec (cmds: String*) : Box[String]

    Execute the specified OS command and return the output of that command in a Full Box if the command succeeds, or a Failure if an error occurs.

    Execute the specified OS command and return the output of that command in a Full Box if the command succeeds, or a Failure if an error occurs.

    definition classes: IoHelpers
  92. 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
    definition classes: AnyRef
  93. def findBox [T] (nodes: Seq[Node])(f: (Elem) ⇒ Box[T]) : Box[T]

    Given a NodeSeq and a function that returns a Box[T], return the first value found in which the function evaluates to Full

    Given a NodeSeq and a function that returns a Box[T], return the first value found in which the function evaluates to Full

    definition classes: BindHelpers
  94. def findClass (where: List[(String, List[String])]) : Box[Class[AnyRef]]

    Find a class given a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    Find a class given a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  95. def findClass (name: String, where: List[String]) : Box[Class[AnyRef]]

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  96. def findClass [C <: AnyRef] (name: String, where: List[String], targetType: Class[C]) : Box[Class[C]]

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    Find a class given its name and a list of packages, turning underscored names to CamelCase if necessary.

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  97. def findClass (name: String, where: List[String], modifiers: List[(String) ⇒ String]) : Box[Class[AnyRef]]

    General method to in find a class according to its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.

    General method to in find a class according to its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  98. def findClass [C <: AnyRef] (name: String, where: List[String], modifiers: List[(String) ⇒ String], targetType: Class[C]) : Box[Class[C]]

    General method to in find a class according to its name, a list of possible packages, a list of functions modifying the given name create a target name to look for (e.

    General method to in find a class according to its name, a list of possible packages, a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  99. def findElems (nodes: NodeSeq)(f: (Elem) ⇒ Boolean) : NodeSeq

    Find the elements of the specified NodeSeq that match the specified predicate and concatenate them into a resulting NodeSeq.

    Find the elements of the specified NodeSeq that match the specified predicate and concatenate them into a resulting NodeSeq.

    nodes

    - the NodeSeq to search for elements matching the predicate

    f

    - the predicate to match elements with

    returns

    the NodeSeq resulting from concatenation of the matched elements.

    definition classes: HttpHelpers
  100. def findId (ns: NodeSeq) : Box[String]

    Finds the first Element in the NodeSeq (or any children) that has an ID attribute

    Finds the first Element in the NodeSeq (or any children) that has an ID attribute

    definition classes: BindHelpers
  101. def findId (nodes: Seq[Node], id: String) : Option[Elem]

    Given an id value, find the Elem with the specified id

    Given an id value, find the Elem with the specified id

    definition classes: BindHelpers
  102. def findInElems [T] (nodes: NodeSeq)(f: (Elem) ⇒ Iterable[T]) : List[T]

    Map the specified function over the elements of the specified NodeSeq and return the concatenated result.

    Map the specified function over the elements of the specified NodeSeq and return the concatenated result. This is essentially a container-type-transforming flatMap operation.

    definition classes: HttpHelpers
  103. def findKids (in: NodeSeq, prefix: String, label: String) : NodeSeq

    definition classes: HttpHelpers
  104. def findNode (in: Elem, nodes: NodeSeq) : Box[Elem]

    Finds and returns the first node in the specified NodeSeq and its children with the same label and prefix as the specified element.

    Finds and returns the first node in the specified NodeSeq and its children with the same label and prefix as the specified element.

    definition classes: BindHelpers
  105. def findOption [T] (nodes: Seq[Node])(f: (Elem) ⇒ Option[T]) : Option[T]

    Given a NodeSeq and a function that returns an Option[T], return the first value found in which the function evaluates to Some

    Given a NodeSeq and a function that returns an Option[T], return the first value found in which the function evaluates to Some

    definition classes: BindHelpers
  106. def findOrAddId (in: Elem) : (Elem, String)

    If the specified Elem has an attribute named 'id', return it, otherwise construct a new Elem with a randomly generated id attribute and return the pair

    If the specified Elem has an attribute named 'id', return it, otherwise construct a new Elem with a randomly generated id attribute and return the pair

    in

    the element to test &amp; add 'id' to

    returns

    the new element and the id

    definition classes: HttpHelpers
  107. def findOrCreateId (f: (String) ⇒ (NodeSeq) ⇒ NodeSeq) : (NodeSeq) ⇒ NodeSeq

    Find the first Elem in the NodeSeq.

    Find the first Elem in the NodeSeq. If it has an id attribute, then call the function, f, with that id. If the first Elem does not have an id attribute, create an id attribute and pass that id attribute to the function

    definition classes: BindHelpers
  108. def findType [C <: AnyRef] (where: List[(String, List[String])])(implicit m: Manifest[C]) : Box[Class[C]]

    Find a class given its type, a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    Find a class given its type, a list of possible names and corresponding packages, turning underscored names to CamelCase if necessary

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  109. def findType [C <: AnyRef] (name: String, where: List[String])(implicit m: Manifest[C]) : Box[Class[C]]

    Find a class given its type, its name and a list of packages, turning underscored names to CamelCase if necessary.

    Find a class given its type, its name and a list of packages, turning underscored names to CamelCase if necessary.

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  110. def findType [C <: AnyRef] (name: String, where: List[String], modifiers: List[(String) ⇒ String])(implicit m: Manifest[C]) : Box[Class[C]]

    General method to in find a class according to its type, its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.

    General method to in find a class according to its type, its name, a list of possible packages and a list of functions modifying the given name create a target name to look for (e.g: 'name' is hello_world and the target name may be 'HelloWorld').

    returns

    a Box, either containing the found class or an Empty can.

    definition classes: ClassHelpers
  111. def first [B, C] (in: Seq[B])(_f: (B) ⇒ Box[C]) : Box[C]

    Returns the first application of f to an element of in that results in a Full can.

    Returns the first application of f to an element of in that results in a Full can. If f applied to an element of in results in an Empty can, then f will be applied to the rest of the elements of in until a Full can results. If the list runs out then an Empty can is returned.

    in

    a list of elements to which f can be applied

    returns

    a Box containing the first Full can or Empty if f never returns a Full can

    definition classes: ListHelpers
  112. def first_? [B] (in: Seq[B])(f: ⇒ (B) ⇒ Boolean) : Box[B]

    Returns a Full can with the first element x of the list in for which f(x) evaluates to true.

    Returns a Full can with the first element x of the list in for which f(x) evaluates to true. If f(x) evaluates to false for every x, then an Empty can is returned.

    in

    a list of elements to which f can be applied

    f

    a function that can be applied to elements of in

    returns

    a Box containing the found element (or Empty if not found)

    definition classes: ListHelpers
  113. def formattedDateNow : String

    returns

    today's date formatted as yyyy/MM/dd

    definition classes: TimeHelpers
  114. def formattedTimeNow : String

    returns

    now's time formatted as HH:mm zzz

    definition classes: TimeHelpers
  115. 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
  116. def hash (in: String) : String

    create a SHA hash from a String

    create a SHA hash from a String

    definition classes: SecurityHelpers
  117. def hash (in: Array[Byte]) : Array[Byte]

    create a SHA hash from a Byte array

    create a SHA hash from a Byte array

    definition classes: SecurityHelpers
  118. def hash256 (in: String) : String

    create a SHA-256 hash from a String

    create a SHA-256 hash from a String

    definition classes: SecurityHelpers
  119. def hash256 (in: Array[Byte]) : Array[Byte]

    create a SHA-256 hash from a Byte array

    create a SHA-256 hash from a Byte array

    definition classes: SecurityHelpers
  120. 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: AnyRef → Any
  121. def hashHex (in: String) : String

    create a SHA hash from a String

    create a SHA hash from a String

    definition classes: SecurityHelpers
  122. def head [T] (l: Seq[T], deft: ⇒ T) : T

    Return the first element of a List or a default value if the list is empty

    Return the first element of a List or a default value if the list is empty

    definition classes: ListHelpers
  123. def hexDecode (str: String) : Array[Byte]

    definition classes: SecurityHelpers
  124. def hexDigest (in: Array[Byte]) : String

    create an hex encoded SHA hash from a Byte array

    create an hex encoded SHA hash from a Byte array

    definition classes: SecurityHelpers
  125. def hexDigest256 (in: Array[Byte]) : String

    create an hex encoded SHA-256 hash from a Byte array

    create an hex encoded SHA-256 hash from a Byte array

    definition classes: SecurityHelpers
  126. def hexEncode (in: Array[Byte]) : String

    encode a Byte array as hexadecimal characters

    encode a Byte array as hexadecimal characters

    definition classes: SecurityHelpers
  127. def hourFormat (in: Date) : String

    returns

    the formatted time for a given Date

    definition classes: TimeHelpers
  128. def hourFormat : SimpleDateFormat

    returns

    a standard format HH:mm:ss

    definition classes: TimeHelpers
  129. def hours (in: Long) : Long

    returns

    the number of millis corresponding to 'in' hours

    definition classes: TimeHelpers
  130. def instantiate [C] (clz: Class[C]) : Box[C]

    Create a new instance of a class

    Create a new instance of a class

    returns

    a Full can with the instance or a Failure if the instance can't be created

    definition classes: ClassHelpers
  131. def insureField (toInsure: List[(String, String)], headers: List[(String, String)]) : List[(String, String)]

    Ensure that all the appropriate fields are in the header.

    Ensure that all the appropriate fields are in the header.

    definition classes: HttpHelpers
  132. implicit def intToTimeSpan (in: Int) : TimeSpan

    transforms an int to a TimeSpan object.

    transforms an int to a TimeSpan object. Usage: 3000 returns a TimeSpan of 3000L millis

    attributes: implicit
    definition classes: TimeHelpers
  133. implicit def intToTimeSpanBuilder (in: Int) : TimeSpanBuilder

    transforms an int to a TimeSpanBuilder object.

    transforms an int to a TimeSpanBuilder object. Usage: 3.seconds returns a TimeSpan of 3000L millis

    attributes: implicit
    definition classes: TimeHelpers
  134. def internetDateFormatter : SimpleDateFormat

    returns

    a formatter for internet dates (RFC822/1123) including: the day of week, the month, day of month, time and time zone

    definition classes: TimeHelpers
  135. def invokeControllerMethod (clz: Class[_], meth: String) : Any

    Invoke a controller method (parameterless, public) on a class

    Invoke a controller method (parameterless, public) on a class

    clz

    the class owning the method

    returns

    the result of the method invocation or throws the root exception causing an error

    definition classes: ClassHelpers
  136. def invokeMethod [C] (clz: Class[C], inst: AnyRef, meth: String, params: Array[AnyRef], ptypes: Array[Class[_]]) : Box[Any]

    Invoke the given method for the given class, with some parameters and their types Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used

    Invoke the given method for the given class, with some parameters and their types Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used

    clz

    class whose method should be invoked

    inst

    instance of the class who method should be invoked, if the method is not static

    meth

    method to invoke

    params

    parameters to pass to the method

    ptypes

    list of types of the parameters

    returns

    a Box containing the value returned by the method

    definition classes: ClassHelpers
  137. def invokeMethod [C] (clz: Class[C], inst: AnyRef, meth: String, params: Array[AnyRef]) : Box[Any]

    Invoke the given method for the given class, with some parameters.

    Invoke the given method for the given class, with some parameters. Tries the method name, then the method as a CamelCased name and the method as a camelCased name The class is not instanciated if the method is static, otherwise the passed instance is used

    clz

    class whose method should be invoked

    inst

    instance of the class who method should be invoked, if the method is not static

    meth

    method to invoke

    params

    parameters to pass to the method

    returns

    a Box containing the value returned by the method

    definition classes: ClassHelpers
  138. def invokeMethod [C] (clz: Class[C], inst: AnyRef, meth: String) : Box[Any]

    Invoke the given method for the given class, with no params.

    Invoke the given method for the given class, with no params. The class is not instanciated if the method is static, otherwise the passed instance is used

    clz

    class whose method should be invoked

    inst

    instance of the class who method should be invoked, if the method is not static

    meth

    method to invoke

    returns

    a Box containing the value returned by the method

    definition classes: ClassHelpers
  139. def isEq (a: Array[Byte], b: Array[Byte]) : Boolean

    Compare two arrays of Byte for byte equality.

    Compare two arrays of Byte for byte equality.

    returns

    true if two Byte arrays contain the same bytes

    definition classes: BasicTypesHelpers
  140. 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
  141. val knownSuffixes : Set[String]

    The list of known suffixes used to split the URI into path parts and suffixes.

    The list of known suffixes used to split the URI into path parts and suffixes.

    definition classes: HttpHelpers
  142. def listFromListAndString (lst: List[String], s: String) : List[String]

    Creates a List of Strings from a List[String] and a String

    Creates a List of Strings from a List[String] and a String

    definition classes: StringHelpers
  143. def listFromStrings (s1: String, s2: String) : List[String]

    Creates a List of Strings from two Strings

    Creates a List of Strings from two Strings

    definition classes: StringHelpers
  144. def listIf [T] (expr: Boolean)(f: ⇒ T) : List[T]

    Return a list containing the element f if the expression is true

    Return a list containing the element f if the expression is true

    definition classes: ListHelpers
  145. implicit def listStringToSuper (in: List[String]) : SuperListString

    returns

    a SuperString with more available methods such as roboSplit or commafy

    attributes: implicit
    definition classes: StringHelpers
  146. implicit def listToListMapish (in: Seq[(String, String)]) : ListMapish

    adds the ciGet method to a List of Pairs of Strings

    adds the ciGet method to a List of Pairs of Strings

    attributes: implicit
    definition classes: ListHelpers
  147. def logTime [T] (f: ⇒ (String, T)) : T

    Call f and log the string returned together with the time taken in millis.

    Call f and log the string returned together with the time taken in millis.

    returns

    the second result from f

    definition classes: TimeHelpers
  148. def logTime [T] (msg: String)(f: ⇒ T) : T

    Log a message with the time taken in millis to do something and return the result

    Log a message with the time taken in millis to do something and return the result

    returns

    the result

    definition classes: TimeHelpers
  149. implicit def longToTimeSpan (in: Long) : TimeSpan

    transforms a long to a TimeSpan object.

    transforms a long to a TimeSpan object. Usage: 3000L returns a TimeSpan of 3000L millis

    attributes: implicit
    definition classes: TimeHelpers
  150. implicit def longToTimeSpanBuilder (in: Long) : TimeSpanBuilder

    transforms a long to a TimeSpanBuilder object.

    transforms a long to a TimeSpanBuilder object. Usage: 3L.seconds returns a TimeSpan of 3000L millis

    attributes: implicit
    definition classes: TimeHelpers
  151. def md5 (in: String) : String

    create a MD5 digest from a String

    create a MD5 digest from a String

    definition classes: SecurityHelpers
  152. def md5 (in: Array[Byte]) : Array[Byte]

    create a MD5 digest from a Byte array

    create a MD5 digest from a Byte array

    definition classes: SecurityHelpers
  153. def millis : Long

    returns

    the current number of millis: System.currentTimeMillis

    definition classes: TimeHelpers
  154. def millisToDays (millis: Long) : Long

    returns

    the number of days since epoch converted from millis

    definition classes: TimeHelpers
  155. def minutes (in: Long) : Long

    returns

    the number of millis corresponding to 'in' minutes

    definition classes: TimeHelpers
  156. def mixinAttributes (out: Elem)(in: NodeSeq) : NodeSeq

    Takes attributes from the first node of 'in' (if any) and mixes them into 'out'.

    Takes attributes from the first node of 'in' (if any) and mixes them into 'out'. Curried form can be used to produce a NodeSeq => NodeSeq for bind.

    out

    where to put the attributes

    in

    where to take the attributes from

    returns

    'out' element with attributes from 'in'

    definition classes: BindHelpers
  157. def month (in: Date) : Int

    returns

    the month corresponding to today (0 based, relative to UTC)

    definition classes: TimeHelpers
  158. def nano : Long

    returns

    the current System.nanoTime()

    definition classes: TimeHelpers
  159. 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
  160. def nextFuncName (seed: Long) : String

    Get a guaranteed unique field name (16 or 17 letters and numbers, starting with a letter)

    Get a guaranteed unique field name (16 or 17 letters and numbers, starting with a letter)

    definition classes: HttpHelpers
  161. def nextFuncName : String

    Get a guaranteed unique field name (16 or 17 letters and numbers, starting with a letter)

    Get a guaranteed unique field name (16 or 17 letters and numbers, starting with a letter)

    definition classes: HttpHelpers
  162. def nextNum : Long

    Get a monotonically increasing number that's guaranteed to be unique for the current session

    Get a monotonically increasing number that's guaranteed to be unique for the current session

    definition classes: HttpHelpers
  163. def noHtmlTag (in: NodeSeq) : Boolean

    Return true if the xml doesn't contain an &lt;html&gt; tag

    Return true if the xml doesn't contain an &lt;html&gt; tag

    definition classes: HttpHelpers
  164. implicit def nodeSeqToOptionString (in: NodeSeq) : Box[String]

    returns

    an Empty can if the node seq is empty and a full can with the NodeSeq text otherwise

    attributes: implicit
    definition classes: StringHelpers
  165. def notEq (a: Array[Byte], b: Array[Byte]) : Boolean

    Compare two arrays of Byte for byte equality.

    Compare two arrays of Byte for byte equality.

    returns

    true if two Byte arrays don't contain the same bytes

    definition classes: BasicTypesHelpers
  166. 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
  167. 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
  168. def now : Date

    returns

    the date object for now

    definition classes: TimeHelpers
  169. def nowAsInternetDate : String

    returns

    the current time as an internet date

    definition classes: TimeHelpers
  170. implicit def pairToUnprefixed (in: (String, Any)) : MetaData

    Transform a pair (name: String, value: Any) to an unprefixed XML attribute name="value"

    Transform a pair (name: String, value: Any) to an unprefixed XML attribute name="value"

    attributes: implicit
    definition classes: HttpHelpers
  171. def paramsToUrlParams (params: List[(String, String)]) : String

    Take a list of name/value parse and turn them into a URL query string

    Take a list of name/value parse and turn them into a URL query string

    params

    the name/value pairs

    returns

    a valid query string

    definition classes: HttpHelpers
  172. def parseInternetDate (dateString: String) : Date

    returns

    a date from a string using the internet format. Return the Epoch date if the parse is unsuccesfull

    definition classes: TimeHelpers
  173. def parseNumber (tin: String) : Long

    Parse a string and return the Long value of that string.

    Parse a string and return the Long value of that string.

    The string can start with '-' if it is a negative number or '+' for a positive number

    returns

    the Long value of the input String

    definition classes: StringHelpers
  174. def permuteList [T] (in: Seq[T]) : List[List[T]]

    Given a list, return all the permutations of the list.

    Given a list, return all the permutations of the list.

    in

    -- the list

    returns

    all the permutations of the list

    definition classes: ListHelpers
  175. def permuteWithSublists [T] (in: Seq[T]) : List[List[T]]

    Given a list, return all the permutations including the removal of items (does not return a Nil list unless in is Nil).

    Given a list, return all the permutations including the removal of items (does not return a Nil list unless in is Nil).

    in

    the list to permute

    returns

    all the permutations of the list including sublists, sorted in longest to shortest

    definition classes: ListHelpers
  176. implicit def pfToGuardable [A] (in: PartialFunction[A, _]) : PartialFunctionWrapper[A]

    promote a partial function such that we can invoke the guard method to wrap the guarded partial function with a guard

    promote a partial function such that we can invoke the guard method to wrap the guarded partial function with a guard

    attributes: implicit
    definition classes: BasicTypesHelpers
  177. def processBind (around: NodeSeq, atWhat: Map[String, NodeSeq]) : NodeSeq

    Bind parameters to XML.

    Bind parameters to XML.

    around

    XML with lift:bind elements

    atWhat

    data to bind

    definition classes: BindHelpers
      deprecated:
    1. use the bind function instead

  178. def processString (msg: String, subst: Map[String, String]) : String

    Replaces the value found in a string surrounded by &lt;%= .

    Replaces the value found in a string surrounded by &lt;%= ... %&gt; by a replacement according to the value found in the subst Map.

    Throws an exception if no correspondance can be found.

    msg

    string where replacements should be done

    subst

    map of [regular expression with groups, replacement]

    definition classes: StringHelpers
  179. def randomInt (mod: Int) : Int

    return a random int modulo a number

    return a random int modulo a number

    definition classes: SecurityHelpers
  180. def randomLong (mod: Long) : Long

    return a random Long modulo a number

    return a random Long modulo a number

    definition classes: SecurityHelpers
  181. def randomString (size: Int) : String

    Create a random string of a given size.

    Create a random string of a given size. 5 bits of randomness per character

    size

    size of the string to create. Must be a positive integer.

    returns

    the generated string

    definition classes: StringHelpers
  182. def readWholeFile (file: File) : Array[Byte]

    Read an entire file into an Array[Byte]

    Read an entire file into an Array[Byte]

    definition classes: IoHelpers
  183. def readWholeStream (in: InputStream) : Array[Byte]

    Read all data from a stream into an Array[Byte]

    Read all data from a stream into an Array[Byte]

    definition classes: IoHelpers
  184. def readWholeThing (in: Reader) : String

    Read all data to the end of the specified Reader and concatenate the resulting data into a string.

    Read all data to the end of the specified Reader and concatenate the resulting data into a string.

    definition classes: IoHelpers
  185. def replaceIdNode (in: NodeSeq, id: String, replacement: NodeSeq) : NodeSeq

    Replace the element with the id that matches with the replacement nodeseq.

    Replace the element with the id that matches with the replacement nodeseq.

    definition classes: BindHelpers
  186. def roboSplit (what: String, sep: String) : List[String]

    Split a string according to a separator

    Split a string according to a separator

    sep

    a regexp to use with the String::split method

    returns

    a list of trimmed parts whose length is &gt; 0

    definition classes: StringHelpers
  187. def rotateList [T] (in: Seq[T]) : List[List[T]]

    Given an incoming list, return a set of lists that is the original list rotated through all its positions

    Given an incoming list, return a set of lists that is the original list rotated through all its positions

    in

    the list to rotate

    returns

    all the rotations of the list

    definition classes: ListHelpers
  188. def seconds (in: Long) : Long

    returns

    the number of millis corresponding to 'in' seconds

    definition classes: TimeHelpers
  189. def secureEquals (s1: Array[Byte], s2: Array[Byte]) : Boolean

    Compare two byte arrays in a way that does not vary if the arrays are determined to be not equal early (test every byte.

    Compare two byte arrays in a way that does not vary if the arrays are determined to be not equal early (test every byte... avoids timing attackes

    definition classes: SecurityHelpers
  190. def secureEquals (s1: String, s2: String) : Boolean

    Compare two strings in a way that does not vary if the strings are determined to be not equal early (test every byte.

    Compare two strings in a way that does not vary if the strings are determined to be not equal early (test every byte... avoids timing attackes

    definition classes: SecurityHelpers
  191. def shouldShow (percent: Double) : Boolean

    return true only 'percent' times when asked repeatedly.

    return true only 'percent' times when asked repeatedly. This function is used in the Skittr example to get a random set of users

    percent

    percentage as a double number <= 1.0

    definition classes: SecurityHelpers
  192. def snakify (name: String) : String

    Turn a string of format "FooBar" into snake case "foo_bar"

    Turn a string of format "FooBar" into snake case "foo_bar"

    Note: snakify is not reversible, ie. in general the following will _not_ be true:

    s == camelify(snakify(s))

    returns

    the underscored string

    definition classes: StringHelpers
  193. def splitAt (what: String, sep: String) : List[(String, String)]

    Split a string in 2 parts at the first place where a separator is found

    Split a string in 2 parts at the first place where a separator is found

    returns

    a List containing a pair of the 2 trimmed parts

    definition classes: StringHelpers
  194. def splitAtHash (str: String)(f: (String) ⇒ String) : String

    Split a String at the Hash sign, run the function on the non-# side and then append the hash side

    Split a String at the Hash sign, run the function on the non-# side and then append the hash side

    definition classes: HttpHelpers
  195. def splitColonPair (in: String, first: String, second: String) : (String, String)

    Split a string separated by a point or by a column in 2 parts.

    Split a string separated by a point or by a column in 2 parts. Uses default values if only one is found or if no parts are found

    in

    string to split

    first

    default value for the first part if no split can be done

    second

    default value for the second part if one or less parts can be found

    returns

    a pair containing the first and second parts

    definition classes: StringHelpers
  196. def splitNameValuePairs (props: String) : Map[String, String]

    Splits a string of the form &lt;name1=value1, name2=value2, .

    Splits a string of the form &lt;name1=value1, name2=value2, ... &gt; and unquotes the quoted values. The result is a Map[String, String]

    definition classes: StringHelpers
  197. implicit def strToBPAssoc (in: String) : BindParamAssoc

    transforms a String to a BindParamAssoc object which can be associated to a BindParam object using the --> operator.

    transforms a String to a BindParamAssoc object which can be associated to a BindParam object using the --> operator.

    Usage: "David" --> "name"

    attributes: implicit
    definition classes: BindHelpers
      deprecated:
    1. use -> instead

  198. implicit def strToCssBindPromoter (str: String) : ToCssBindPromoter

    promote a String to a ToCssBindPromotor

    promote a String to a ToCssBindPromotor

    attributes: implicit
    definition classes: BindHelpers
  199. implicit def strToSuperArrowAssoc (in: String) : SuperArrowAssoc

    attributes: implicit
    definition classes: BindHelpers
  200. implicit def stringToSuper (in: String) : SuperString

    returns

    a SuperString with more available methods such as roboSplit or commafy

    attributes: implicit
    definition classes: StringHelpers
  201. def stripHead (in: NodeSeq) : NodeSeq

    Remove all the <head> tags, just leaving the child tags

    Remove all the <head> tags, just leaving the child tags

    definition classes: BindHelpers
  202. implicit def symToBPAssoc (in: Symbol) : BindParamAssoc

    transforms a Symbol to a BindParamAssoc object which can be associated to a BindParam object using the --> operator.

    transforms a Symbol to a BindParamAssoc object which can be associated to a BindParam object using the --> operator.

    Usage: 'David --> "name"

    attributes: implicit
    definition classes: BindHelpers
      deprecated:
    1. use -> instead

  203. def synchronized [T0] (arg0: T0) : T0

    attributes: final
    definition classes: AnyRef
  204. def template (xhtml: NodeSeq, prefix: String, tag1: String, tag2: String, tag3: String) : Box[(NodeSeq, NodeSeq, NodeSeq)]

    Find three of many templates from the children

    Find three of many templates from the children

    definition classes: BindHelpers
  205. def template (xhtml: NodeSeq, prefix: String, tag1: String, tag2: String) : Box[(NodeSeq, NodeSeq)]

    Find two of many templates from the children

    Find two of many templates from the children

    definition classes: BindHelpers
  206. def template (xhtml: NodeSeq, prefix: String, tag: String) : Box[NodeSeq]

    Similar to chooseTemplate, this returns the contents of the element in a Full Box if found or an Empty Box otherwise.

    Similar to chooseTemplate, this returns the contents of the element in a Full Box if found or an Empty Box otherwise.

    definition classes: BindHelpers
  207. def time (when: Long) : Date

    alias for new Date(millis)

    alias for new Date(millis)

    definition classes: TimeHelpers
  208. def timeFormatter : SimpleDateFormat

    returns

    a format for the time which includes the TimeZone: HH:mm zzz

    definition classes: TimeHelpers
  209. def timeNow : Date

    returns

    the current time as a Date object

    definition classes: TimeHelpers
      deprecated:
    1. use now instead

  210. def toBoolean (in: Any) : Boolean

    Convert any object to an "equivalent" Boolean depending on its value

    Convert any object to an "equivalent" Boolean depending on its value

    definition classes: BasicTypesHelpers
  211. def toByteArrayInputStream (in: InputStream) : ByteArrayInputStream

    Convert any InputStream to a ByteArrayInputStream

    Convert any InputStream to a ByteArrayInputStream

    definition classes: BasicTypesHelpers
  212. implicit def toCalendarExtension (c: Calendar) : CalendarExtension

    implicit def used to add the setXXX methods to the Calendar class

    implicit def used to add the setXXX methods to the Calendar class

    attributes: implicit
    definition classes: TimeHelpers
  213. def toDate (in: Any) : Box[Date]

    returns

    a Full(date) or a failure if the input couldn't be translated to date (or Empty if the input is null)

    definition classes: TimeHelpers
  214. implicit def toDateExtension (d: Date) : DateExtension

    implicit def used to add the noTime method to the Date class

    implicit def used to add the noTime method to the Date class

    attributes: implicit
    definition classes: TimeHelpers
  215. def toHashMap [A, B] (in: Map[A, B]) : HashMap[A, B]

    Transform a general Map to a nutable HashMap

    Transform a general Map to a nutable HashMap

    definition classes: HttpHelpers
  216. def toInt (in: Any) : Int

    Convert any object to an "equivalent" Int depending on its value

    Convert any object to an "equivalent" Int depending on its value

    definition classes: BasicTypesHelpers
  217. def toInternetDate (in: Long) : String

    returns

    a date formatted with the internet format (from a number of millis)

    definition classes: TimeHelpers
  218. def toInternetDate (in: Date) : String

    returns

    a date formatted with the internet format

    definition classes: TimeHelpers
  219. def toLong (in: Any) : Long

    Convert any object to an "equivalent" Long depending on its value

    Convert any object to an "equivalent" Long depending on its value

    definition classes: BasicTypesHelpers
  220. implicit def toOptiCons (expr: ⇒ Boolean) : OptionalCons

    Implicit transformation from a Boolean expression to an OptionalCons object so that an element can be added to a list if the expression is true

    Implicit transformation from a Boolean expression to an OptionalCons object so that an element can be added to a list if the expression is true

    attributes: implicit
    definition classes: BasicTypesHelpers
  221. 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: AnyRef → Any
  222. implicit def toSuperList [T] (in: List[T]) : SuperList[T]

    Add utility methods to Lists

    Add utility methods to Lists

    attributes: implicit
    definition classes: ListHelpers
  223. def today : Calendar

    returns

    the Calendar object for today (the TimeZone is the local TimeZone). Its time is 00:00:00.000

    definition classes: TimeHelpers
  224. def tryo [T] (ignore: Class[_])(f: ⇒ T) : Box[T]

    Wraps a "try" block around the function f.

    Wraps a "try" block around the function f. Takes only one Class of exception to ignore

    ignore

    - a single exception classes to ignore. A thrown exception will be ignored if it is assignable from this class.

    f

    - the block of code to evaluate @return

    • Full(result of the evaluation of f) if f doesn't throw any exception
    • a Failure if f throws an exception
    • Empty if the exception class is in the ignore list
    definition classes: ControlHelpers
  225. def tryo [T] (ignore: List[Class[_]])(f: ⇒ T) : Box[T]

    Wraps a "try" block around the function f

    Wraps a "try" block around the function f

    ignore

    - a list of exception classes to ignore. A thrown exception will be ignored if it is assignable from one of the exception classes in the list

    f

    - the block of code to evaluate @return

    • Full(result of the evaluation of f) if f doesn't throw any exception
    • a Failure if f throws an exception
    • Empty if the exception class is in the ignore list
    definition classes: ControlHelpers
  226. def tryo [T] (onError: (Throwable) ⇒ Unit)(f: ⇒ T) : Box[T]

    Wraps a "try" block around the function f and trigger a callback function if an exception is thrown

    Wraps a "try" block around the function f and trigger a callback function if an exception is thrown

    onError

    - an optional callback function that will use the thrown exception as a parameter

    f

    - the block of code to evaluate @return

    • Full(result of the evaluation of f) if f doesn't throw any exception
    • a Failure if f throws an exception
    definition classes: ControlHelpers
  227. def tryo [T] (f: ⇒ T) : Box[T]

    Wraps a "try" block around the function f

    Wraps a "try" block around the function f

    f

    - the block of code to evaluate @return

    • Full(result of the evaluation of f) if f doesn't throw any exception
    • a Failure if f throws an exception
    definition classes: ControlHelpers
  228. def tryo [T] (handler: PartialFunction[Throwable, T], f: ⇒ T) : Box[T]

    Wraps a "try" block around the function f.

    Wraps a "try" block around the function f. If f throws an exception that is in the domain of the handler PF, the handler will be invoked on the exception. Otherwise the exception is wrapped into a Failure.

    handler

    - A partial function that handles exceptions

    f

    - the block of code to evaluate @return

    • Full(result of the evaluation of f) if f doesn't throw any exception
    • a Failure if f throws an exception
    definition classes: ControlHelpers
      see also:
    1. net.liftweb.common.Failure

  229. def tryo [T] (ignore: List[Class[_]], onError: Box[(Throwable) ⇒ Unit])(f: ⇒ T) : Box[T]

    Wraps a "try" block around the function f.

    Wraps a "try" block around the function f. If f throws an exception with its class in the 'ignore' list or if 'ignore' is null or an empty list, ignore the exception and return None.

    ignore

    - a list of exception classes to ignore. A thrown exception will be ignored if it is assignable from one of the exception classes in the list

    onError

    - an optional callback function that will use the thrown exception as a parameter

    f

    - the block of code to evaluate @return

    • Full(result of the evaluation of f) if f doesn't throw any exception
    • a Failure if f throws an exception
    • Empty if the exception class is in the ignore list
    definition classes: ControlHelpers
  230. def unCamelCase (name: String) : String

    definition classes: ClassHelpers
      deprecated:
    1. Use StringHelpers.snakify

  231. def unquote (str: String) : String

    If str is surrounded by quotes it return the content between the quotes

    If str is surrounded by quotes it return the content between the quotes

    definition classes: StringHelpers
  232. def urlDecode (in: String) : String

    URL decode the string.

    URL decode the string.

    This is a pass-through to Java's URL decode with UTF-8

    definition classes: HttpHelpers
  233. def urlEncode (in: String) : String

    URL encode the string.

    URL encode the string.

    This is a pass-through to Java's URL encode with UTF-8

    definition classes: HttpHelpers
  234. val utc : TimeZone

    The UTC TimeZone

    The UTC TimeZone

    definition classes: TimeHelpers
  235. def wait () : Unit

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

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

    attributes: final
    definition classes: AnyRef
  238. def weeks (in: Long) : Long

    returns

    the number of millis corresponding to 'in' weeks

    definition classes: TimeHelpers
  239. def xbind (namespace: String, xml: NodeSeq)(transform: PartialFunction[String, (NodeSeq) ⇒ NodeSeq]) : NodeSeq

    Experimental extension to bind which passes in an additional "parameter" from the XHTML to the transform function, which can be used to format the returned NodeSeq.

    Experimental extension to bind which passes in an additional "parameter" from the XHTML to the transform function, which can be used to format the returned NodeSeq.

    definition classes: BindHelpers
      deprecated:
    1. use bind instead

  240. def xmlParam (in: NodeSeq, param: String) : Box[String]

    Finds the named attribute in specified XML element and returns a Full Box containing the value of the attribute if found.

    Finds the named attribute in specified XML element and returns a Full Box containing the value of the attribute if found. Empty otherwise.

    returns

    a Full Box containing the value of the attribute if found; Empty otherwise

    definition classes: BindHelpers
  241. def year (in: Date) : Int

    returns

    the year corresponding to today (relative to UTC)

    definition classes: TimeHelpers

Inherited from ControlHelpers

Inherited from ClassHelpers

Inherited from BasicTypesHelpers

Inherited from IoHelpers

Inherited from HttpHelpers

Inherited from BindHelpers

Inherited from SecurityHelpers

Inherited from ListHelpers

Inherited from StringHelpers

Inherited from TimeHelpers

Inherited from AnyRef

Inherited from Any