-
<static> compareValues()
-
Compares 2 values using strict equality except for the case of
- Array [order matters]; will traverse through the arrays and compare oj.Object.compareValues(array[i], array2[i])
- Instances that support valueOf [i.e. Boolean, String, Number, Date, and etc] will be compared by usage of that function
- Source:
-
<static> copyPropertiesForClass(targetClass, source)
-
Copies properties from the source object to the prototype of the target class
Only properties 'owned' by the source object will be copied, i.e. the properties
from the source object's prototype chain will not be included.
To copy properties from another class with methods defined on the prototype, pass
otherClass.prototype as the source.
Parameters:
Name |
Type |
Description |
targetClass |
Function
|
the function whose prototype will be used a
copy target |
source |
Object
|
object whose properties will be copied |
- Source:
-
<static> createCallback(obj, func) → {Function}
-
Binds the supplied callback function to an object
Parameters:
Name |
Type |
Description |
obj |
Object!
|
object that will be available to the supplied callback
function as 'this' |
func |
Function!
|
the original callback |
- Source:
Returns:
a function that will be invoking the original callback with
'this' object assigned to obj
-
Type
-
Function
-
<static> createSubclass(extendingClass, baseClass, typeName)
-
Creates a subclass of a baseClass
Parameters:
Name |
Type |
Argument |
Description |
extendingClass |
Function
|
|
The class to extend from the base class |
baseClass |
Function
|
|
class to make the superclass of extendingClass |
typeName |
string
|
<optional>
|
to use for new class. If not specified, the typeName will be extracted from the
baseClass's function if possible |
- Source:
-
<static> ensureClassInitialization(clazz)
-
Ensures that a class is initialized. Although class initialization occurs
by default the first time that an instance of a class is created, classes that
use static factory methods to create their instances may
still need to ensure that their class has been initialized when the factory
method is called.
Parameters:
Name |
Type |
Description |
clazz |
Function
|
The class to ensure initialization of |
- Source:
-
<static> getTypeName(clazz) → {String}
-
Returns the type name for a class derived from oj.Object
Parameters:
Name |
Type |
Description |
clazz |
Function!
|
null
|
Class to get the name of |
- Source:
Returns:
name of the Class
-
Type
-
String
-
clone() → {Object}
-
Returns a clone of this object. The default implementation is a shallow
copy. Subclassers can override this method to implement a deep copy.
- Source:
Returns:
a clone of this object
-
Type
-
Object
-
equals(object) → {boolean}
-
Indicates whether some other oj.Object is "equal to" this one.
Method is equivalent to java ".equals()" method.
Parameters:
Name |
Type |
Description |
object |
Object
|
comparison target |
- Source:
Returns:
true if if the comparison target is equal to this object, false otherwise
-
Type
-
boolean
-
getClass(otherInstance) → {Function}
-
Returns the class object for the instance
Parameters:
Name |
Type |
Argument |
Description |
otherInstance |
Object
|
<optional>
|
if specified, the instance whose type
should be returned. Otherwise the type if this instance will be returned |
- Source:
Returns:
the class object for the instance
-
Type
-
Function
-
getTypeName() → {String}
-
Returns the type name for this instance
- Source:
Returns:
name of the Class
-
Type
-
String
-
Init()
-
Initializes the instance. Subclasses of oj.Object must call
their superclass' Init
- Source:
-
toDebugString()
-
- Source:
-
toString()
-
- Source: