| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |
object BasicTypesHelpers
extends
BasicTypesHelpers with StringHelpers with ControlHelpers
def this
|
| !=.. |
final def !=(arg0 : Any)
|
Boolean | Any |
| !=.. |
final def !=(arg0 : Object)
|
Boolean | AnyRef |
| ==.. |
final def ==(arg0 : Object)
|
Boolean | AnyRef |
| ==.. |
final def ==(arg0 : Any)
|
Boolean | Any |
| ^.. |
def ^[T](i : T*)
This operator transforms its arguments into a List
[details]
|
List[T] | ClassHelpers |
| asInstanceOf.. |
final def asInstanceOf[T0]
|
T0 | Any |
| asInt.. |
def asInt(in : String)
Safely convert the specified String to an Int
|
Box[Int] | BasicTypesHelpers |
| asLong.. |
def asLong(in : String)
Safely convert the specified String to a Long
|
Box[Long] | BasicTypesHelpers |
| asLong.. |
def asLong(in : Any)
Convert any object to an "equivalent" Long depending on its value
|
Box[Long] | BasicTypesHelpers |
| boolean2.. |
implicit def boolean2(b : => Boolean)
Allows an implicit transform from a Boolean to a Boolean2, allowing expressions such as:
(1 == 2) ? "a" | "b" (This expression will return "b")
[details]
|
Boolean2 | BasicTypesHelpers |
| callableMethod_?.. |
def callableMethod_?(meth : Method)
[details]
|
Boolean | ClassHelpers |
| camelCase.. |
def camelCase(name : String)
|
String | ClassHelpers |
| camelCaseMethod.. |
def camelCaseMethod(name : String)
|
String | ClassHelpers |
| camelify.. |
def camelify(name : String)
Turns a string of format "foo_bar" into camel case "FooBar"
Functional code courtesy of Jamie Webb (j@jmawebb
[details]
cjb.net) 2006/11/28
|
String | StringHelpers |
| camelifyMethod.. |
def camelifyMethod(name : 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
[details]
|
String | StringHelpers |
| capify.. |
def capify(in : String)
Capitalize every "word" in the string
[details]
A word is either separated by spaces or underscores.
|
String | StringHelpers |
| classHasControllerMethod.. |
def classHasControllerMethod(clz : Class[Any], name : String)
Check that the method 'name' is callable for class 'clz'
[details]
|
Boolean | ClassHelpers |
| classHierarchy.. |
def classHierarchy(in : Class[Any])
|
List[Class[Any]] | ClassHelpers |
| clean.. |
def clean(in : String)
Remove all the characters from a string exception a-z, A-Z, 0-9, and '_'
[details]
|
String | StringHelpers |
| clone.. |
protected def clone
|
Object | AnyRef |
| containsClass.. |
def containsClass[C](clz : Class[C], toMatch : List[Class[Any]])
Is the clz an instance of (assignable from) any of the classes in the list
[details]
|
Boolean | ClassHelpers |
| createInvoker.. |
def createInvoker[C <: Object](name : String, on : C)
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
[details]
|
Box[() => Box[Any]] | ClassHelpers |
| emptyForNull.. |
def emptyForNull(s : String)
Test for null and return either the given String if not null or the empty String
|
String | StringHelpers |
| eq.. |
final def eq(arg0 : Object)
|
Boolean | AnyRef |
| equals.. |
def equals(arg0 : Any)
|
Boolean | AnyRef |
| escChar.. |
def escChar(in : Char)
Create the unicode value of a character
[details]
|
String | StringHelpers |
| finalize.. |
protected def finalize
|
Unit | AnyRef |
| findClass.. |
def findClass[C <: Object](name : String, where : List[String], modifiers : List[(String) => String], targetType : 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
[details]
g: 'name' is hello_world and the target name may be 'HelloWorld').
@parameter name name of the class to find
@parameter where list of package names which may contain the class
@parameter modifiers list of functions that modify the 'name' of the class (e.g., leave it alone, make it camel case, etc.)
@parameter targetType optional expected type which the retrieved class should conform to
|
Box[Class[C]] | ClassHelpers |
| findClass.. |
def findClass(name : String, where : List[String], modifiers : List[(String) => String])
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
[details]
g: 'name' is
hello_world and the target name may be 'HelloWorld').
@parameter name name of the class to find
@parameter where list of package names which may contain the class
@parameter modifiers list of functions that modify the 'name' of the class (e.g., leave it alone, make it camel case, etc.)
|
Box[Class[Object]] | ClassHelpers |
| findClass.. |
def findClass(where : List[(String, List[String])])
Find a class given a list of possible names and corresponding packages, turning underscored
names to CamelCase if necessary
@parameter where list of pairs (name, package names) which may contain the class
[details]
|
Box[Class[Object]] | ClassHelpers |
| findClass.. |
def findClass[C <: Object](name : String, where : List[String], targetType : Class[C])
Find a class given its name and a list of packages, turning underscored names to
CamelCase if necessary
[details]
@parameter name name of the class to find
@parameter where list of package names which may contain the class
@parameter targetType optional expected type which the retrieved class should conform to
|
Box[Class[C]] | ClassHelpers |
| findClass.. |
def findClass(name : String, where : List[String])
Find a class given its name and a list of packages, turning underscored names to CamelCase if
necessary
[details]
@parameter name name of the class to find
@parameter where list of package names which may contain the class
|
Box[Class[Object]] | ClassHelpers |
| findType.. |
def findType[C <: Object](name : String, where : List[String])(implicit m : Manifest[C])
Find a class given its type, its name and a list of packages, turning underscored names to
CamelCase if necessary
[details]
@parameter C type of the class to find
@parameter name name of the class to find
@parameter where list of package names which may contain the class
|
Box[Class[C]] | ClassHelpers |
| findType.. |
def findType[C <: Object](where : List[(String, List[String])])(implicit m : Manifest[C])
Find a class given its type, a list of possible names and corresponding packages, turning
underscored names to CamelCase if necessary
@parameter C type of the class to find
@parameter where list of pairs (name, package names) which may contain the class
[details]
|
Box[Class[C]] | ClassHelpers |
| findType.. |
def findType[C <: Object](name : String, where : List[String], modifiers : List[(String) => String])(implicit m : Manifest[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
[details]
g: 'name' is hello_world and the target name may be 'HelloWorld').
@parameter C type of the class to find
@parameter name name of the class to find
@parameter where list of package names which may contain the class
@parameter modifiers list of functions that modify the 'name' of the class (e.g., leave it alone, make it camel case, etc.)
|
Box[Class[C]] | ClassHelpers |
| getClass.. |
final def getClass
|
Class[Any] | AnyRef |
| hashCode.. |
def hashCode
|
Int | AnyRef |
| instantiate.. |
def instantiate[C](clz : Class[C])
Create a new instance of a class
[details]
|
Box[C] | ClassHelpers |
| invokeControllerMethod.. |
def invokeControllerMethod(clz : Class[Any], meth : String)
Invoke a controller method (parameterless, public) on a class
[details]
|
Any | ClassHelpers |
| invokeMethod.. |
def invokeMethod[C](clz : Class[C], inst : Object, meth : String, params : Array[Object])
Invoke the given method for the given class, with some parameters
[details]
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
|
Box[Any] | ClassHelpers |
| invokeMethod.. |
def invokeMethod[C](clz : Class[C], inst : Object, meth : String)
Invoke the given method for the given class, with no params
[details]
The class is not instanciated if the method is static, otherwise the passed instance is used
|
Box[Any] | ClassHelpers |
| invokeMethod.. |
def invokeMethod[C](clz : Class[C], inst : Object, meth : String, params : Array[Object], ptypes : Array[Class[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
[details]
|
Box[Any] | ClassHelpers |
| isEq.. |
def isEq(a : Array[Byte], b : Array[Byte])
Compare two arrays of Byte for byte equality
[details]
|
Boolean | BasicTypesHelpers |
| isInstanceOf.. |
final def isInstanceOf[T0]
|
Boolean | Any |
| ne.. |
final def ne(arg0 : Object)
|
Boolean | AnyRef |
| nodeSeqToOptionString.. |
implicit def nodeSeqToOptionString(in : NodeSeq)
[details]
|
Box[String] | StringHelpers |
| notEq.. |
def notEq(a : Array[Byte], b : Array[Byte])
Compare two arrays of Byte for byte equality
[details]
|
Boolean | BasicTypesHelpers |
| notify.. |
final def notify
|
Unit | AnyRef |
| notifyAll.. |
final def notifyAll
|
Unit | AnyRef |
| parseNumber.. |
def parseNumber(tin : String)
Parse a string and return the Long value of that string
[details]
The string can start with '-' if it is a negative number or '+' for a positive number
|
Long | StringHelpers |
| processString.. |
def processString(msg : String, subst : Map[String, String])
Replaces the value found in a string surrounded by <%=
[details]
.. %> by a replacement according to the value found in the subst Map.
Throws an exception if no correspondance can be found.
|
String | StringHelpers |
| randomString.. |
def randomString(size : Int)
Create a random string of a given size
[details]
|
String | StringHelpers |
| snakify.. |
def snakify(name : String)
Turn a string of format "FooBar" into snake case "foo_bar"
Note: snakify is not reversible, ie
[details]
in general the following will _not_ be true:
s == camelify(snakify(s))
|
String | StringHelpers |
| splitColonPair.. |
def splitColonPair(in : String, first : String, second : String)
Split a string separated by a point or by a column in 2 parts
[details]
Uses default values if only one is found or if no parts are found
|
(String, String) | StringHelpers |
| splitNameValuePairs.. |
def splitNameValuePairs(props : String)
Splits a string of the form <name1=value1, name2=value2,
[details]
.. > and unquotes the quoted values.
The result is a Map[String, String]
|
Map[String, String] | StringHelpers |
| stringToSuper.. |
implicit def stringToSuper(in : String)
[details]
|
SuperString | StringHelpers |
| synchronized.. |
final def synchronized[T0](arg0 : T0)
|
T0 | AnyRef |
| toBoolean.. |
def toBoolean(in : Any)
Convert any object to an "equivalent" Boolean depending on its value
|
Boolean | BasicTypesHelpers |
| toByteArrayInputStream.. |
def toByteArrayInputStream(in : InputStream)
Convert any InputStream to a ByteArrayInputStream
|
ByteArrayInputStream | BasicTypesHelpers |
| toInt.. |
def toInt(in : Any)
Convert any object to an "equivalent" Int depending on its value
|
Int | BasicTypesHelpers |
| toLong.. |
def toLong(in : Any)
Convert any object to an "equivalent" Long depending on its value
|
Long | BasicTypesHelpers |
| toOptiCons.. |
implicit def toOptiCons(expr : => Boolean)
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
|
OptionalCons | BasicTypesHelpers |
| toString.. |
def toString
|
String | AnyRef |
| tryo.. |
def tryo[T](onError : (Throwable) => Unit)(f : => T)
Wraps a "try" block around the function f and trigger a callback function if an exception is thrown
[details]
|
Box[T] | ControlHelpers |
| tryo.. |
def tryo[T](ignore : Class[Any])(f : => T)
Wraps a "try" block around the function f
[details]
Takes only one Class of exception to ignore
|
Box[T] | ControlHelpers |
| tryo.. |
def tryo[T](handler : PartialFunction[Throwable, T], f : => T)
Wraps a "try" block around the function f
[details]
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.
|
Box[T] | ControlHelpers |
| tryo.. |
def tryo[T](f : => T)
Wraps a "try" block around the function f
[details]
|
Box[T] | ControlHelpers |
| tryo.. |
def tryo[T](ignore : List[Class[Any]])(f : => T)
Wraps a "try" block around the function f
[details]
|
Box[T] | ControlHelpers |
| tryo.. |
def tryo[T](ignore : List[Class[Any]], onError : Box[(Throwable) => Unit])(f : => T)
Wraps a "try" block around the function f
[details]
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.
|
Box[T] | ControlHelpers |
| unCamelCase.. |
def unCamelCase(name : String)
|
String | ClassHelpers |
| unquote.. |
def unquote(str : String)
If str is surrounded by quotes it return the content between the quotes
|
String | StringHelpers |
| wait.. |
final def wait
|
Unit | AnyRef |
| wait.. |
final def wait(arg0 : Long)
|
Unit | AnyRef |
| wait.. |
final def wait(arg0 : Long, arg1 : Int)
|
Unit | AnyRef |
| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |