r20517: re-add cleaned-up webapps
[kai/samba.git] / webapps / qooxdoo-0.6.3-sdk / frontend / framework / source / class / qx / util / Return.js
1 /* ************************************************************************
2
3    qooxdoo - the new era of web development
4
5    http://qooxdoo.org
6
7    Copyright:
8      2004-2006 by 1&1 Internet AG, Germany, http://www.1and1.org
9
10    License:
11      LGPL 2.1: http://www.gnu.org/licenses/lgpl.html
12
13    Authors:
14      * Sebastian Werner (wpbasti)
15      * Andreas Ecker (ecker)
16
17 ************************************************************************ */
18
19 /* ************************************************************************
20
21 #module(core)
22
23 ************************************************************************ */
24
25 qx.OO.defineClass("qx.util.Return");
26
27
28
29
30
31 /*
32 ---------------------------------------------------------------------------
33   SIMPLE RETURN METHODS
34 ---------------------------------------------------------------------------
35 */
36
37 qx.util.Return.returnTrue = function() {
38   return true;
39 };
40
41 qx.util.Return.returnFalse = function() {
42   return false;
43 };
44
45 qx.util.Return.returnNull = function() {
46   return null;
47 };
48
49 qx.util.Return.returnThis = function() {
50   return this;
51 };
52
53 qx.util.Return.returnInstance = function()
54 {
55   if (!this._instance)
56   {
57     this._instance = new this;
58
59     /*
60     if (this._instance.debug) {
61       this._instance.debug("Created...");
62     }*/
63   }
64
65   return this._instance;
66 };
67
68 qx.util.Return.returnZero = function() {
69   return 0;
70 };
71
72 qx.util.Return.returnNegativeIndex = function() {
73   return -1;
74 };