net.liftweb.util

ListHelpers

trait ListHelpers extends AnyRef

The ListHelpers trait provides useful functions which can be applied to Lists.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ListHelpers
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Type Members

  1. class ListMapish extends AnyRef

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

  2. class SuperList [T] extends AnyRef

    Add utility methods to Lists

Value Members

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

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. 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(n^2), 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).

  9. 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.

  10. def enumToList [T] (enum: Enumeration[T]): List[T]

    Convert a java.

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

  11. 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

  12. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  13. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. 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

  16. 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)

  17. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  18. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  19. 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

  20. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  21. def listIf [T] (expr: Boolean)(f: ⇒ T): List[T]

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

  22. 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
  23. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  24. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  25. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  26. 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

  27. 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

  28. 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

  29. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  30. def toString (): String

    Definition Classes
    AnyRef → Any
  31. implicit def toSuperList [T] (in: List[T]): SuperList[T]

    Add utility methods to Lists

    Add utility methods to Lists

    Attributes
    implicit
  32. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  33. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  34. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any