scalax.data

object misc

[source: scalax/data/misc.scala]

object misc
extends AnyRef
Method Summary
def bounds (max : Int, x : Int) : Int
Funnel a value into the range [0,max].
def bounds (min : Int, max : Int, x : Int) : Int
Funnel a value into the range [min,max].
def const [a](f : => a) : (Any) => a
def id [a](x : a) : a
Identity function.
def nullifyExceptions [a >: Null](f : => a) : a
Return the result of f on success or null if there was an exception.
def pred (x : Int) : Int
def simplify (s : java.lang.String) : java.lang.String
"Simplify" a String by trimming and lower-casing it.
implicit def str2xstr (s : java.lang.String) : XString
def succ (x : Int) : Int
def wrapMod (x : Int, m : Int) : Int
Return the positive modulus x mod m.
implicit def xstr2str (s : XString) : java.lang.String
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Class Summary
class HandleGenerator (base : java.lang.String) extends scala.Iterator[java.lang.String]
Generate Strings that are the given base string with a unique integer appended.
class Uniq (val x : Int) extends AnyRef
case class XString (val s : java.lang.String) extends scala.Product
Rich string view.
Method Details
def bounds(max : Int, x : Int) : Int
Funnel a value into the range [0,max].

def bounds(min : Int, max : Int, x : Int) : Int
Funnel a value into the range [min,max].

def wrapMod(x : Int, m : Int) : Int
Return the positive modulus x mod m.

def succ(x : Int) : Int

def pred(x : Int) : Int

def const[a](f : => a) : (Any) => a

def nullifyExceptions[a >: Null](f : => a) : a
Return the result of f on success or null if there was an exception.

def simplify(s : java.lang.String) : java.lang.String
"Simplify" a String by trimming and lower-casing it.

implicit def str2xstr(s : java.lang.String) : XString

implicit def xstr2str(s : XString) : java.lang.String

def id[a](x : a) : a
Identity function.


Copyright (c) 2005-8 The Scalax Project. All Rights Reserved.