Skip to main content

Pentaho+ documentation is moving!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

Array

pentaho.langBase Array

Extends

  • Array

Constructor

Name Description
new Array(source)

Initializes a new array of Base.Array class.

Members

Name Description
ancestor
Static

The ancestor class.

base :  function
Protected

If a method has been overridden, then the base method provides access to the overridden method.

Methods

Name Description
_extend(name, instSpec, classSpec, keyArgs) : Class.<pentaho.lang.Base>
Static
Protected

Actually creates a subclass of this one.

_subclassed(Subclass, instSpec, classSpec, keyArgs)
Static
Protected

Called when a subclass of this class has been created.

extend(name, instSpec, classSpec, keyArgs) : Class.<pentaho.lang.Base>
Static

Creates a subclass of this one.

implement(instSpecs) : Class.<pentaho.lang.Base>
Static

Adds instance specifications to this class.

implementStatic(classSpecs) : Class.<pentaho.lang.Base>
Static

Adds static specifications to this class.

mix(instSpec, classSpec, keyArgs) : Class.<pentaho.lang.Base>
Static

Adds additional members to, or overrides existing ones of, this class.

to(value, other) : pentaho.lang.Base.Array
Static

Converts a value to an instance of this class, or throws if that is impossible.

extend(source, keyArgs) : object

Extend an object with the properties of another.

Constructor Details

new Array(source)

Initializes a new array of Base.Array class.

If provided, extends the created instance with the spec in source parameter.

Create an instance of Base.Array by using pentaho.lang.Base.Array.to to convert an existing array instance.

Source: javascript/web/pentaho/lang/Base.js, line 183

Parameters:
Name Default Value Summary
source : Array
Optional

An extension specification.

Members Details

ancestor:
Static

The ancestor class.

Source: javascript/web/pentaho/lang/Base.js, line 287

base:  function
Protected

If a method has been overridden, then the base method provides access to the overridden method.

Can also be called from within a constructor function.

Source: javascript/web/pentaho/lang/Base.js, line 299

Methods Details

_extend(name, instSpec, classSpec, keyArgs) : Class.<pentaho.lang.Base>
Static
Protected

Actually creates a subclass of this one.

The default implementation creates the subclass constructor, inherits static members and handles the special instSpec.extend_exclude and instSpec.extend_order properties. Then, it delegates the remainder of the subclass setup to the _subclassed, whose default implementation mixes-in the given instance and class specifications.

Source: javascript/web/pentaho/lang/Base.js, line 425

Parameters:
Name Default Value Summary
name : string

The name of the created class.

instSpec : object | undefined

The instance-side specification.

Parameters:
Name Default Value Summary
extend_order : Array.<string>
Optional

An array of instance property names that extend should always apply before other properties and in the given order.

The given property names are appended to any inherited ordered property names.

extend_exclude : object
Optional

A set of property names to exclude, whenever the instance side of the class (through mix or implement) or its instances (through extend) are extended.

The given property names are joined with any inherited excluded property names.

Properties can have any value.

classSpec : object | undefined

The class-side specification.

keyArgs : object | undefined

The keyword arguments.

Returns:
Name Description
Class.<pentaho.lang.Base>

The new subclass.

_subclassed(Subclass, instSpec, classSpec, keyArgs)
Static
Protected

Called when a subclass of this class has been created.

The default implementation mixes the given instance and class specification in the new subclass, without actually recording a mix operation.

Source: javascript/web/pentaho/lang/Base.js, line 564

Parameters:
Name Default Value Summary
Subclass : function

The created subclass.

instSpec : object | undefined

The instance-side specification.

classSpec : object | undefined

The static-side specification.

keyArgs : object | undefined

The keyword arguments.

extend(name, instSpec, classSpec, keyArgs) : Class.<pentaho.lang.Base>
Static

Creates a subclass of this one.

All classes inherit the extend method, so they can also be subclassed.

Inheritance is delegated to the _extend method, which can be overridden.

Source: javascript/web/pentaho/lang/Base.js, line 369

Parameters:
Name Default Value Summary
name : string
Optional

The name of the created class. Used for debugging purposes.

instSpec : object
Optional

The instance specification.

Parameters:
Name Default Value Summary
extend_order : Array.<string>
Optional

An array of instance property names that extend should always apply before other properties and in the given order.

The given property names are appended to any inherited ordered property names.

extend_exclude : object
Optional

A set of property names to exclude, whenever the instance side of the class (through mix or implement) or its instances (through extend) are extended.

The given property names are joined with any inherited excluded property names.

Properties can have any value.

classSpec : object
Optional

The static specification.

keyArgs : object
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
exclude : object
Optional

A set of property names to exclude, both from the instance and class sides, in this method call. Properties can have any value.

Returns:
Name Description
Class.<pentaho.lang.Base>

The new subclass.

implement(instSpecs) : Class.<pentaho.lang.Base>
Static

Adds instance specifications to this class.

This method does not create a new class.

Each instance specification can be a class or an object. When it is a class, only its instance-side is mixed-in.

Source: javascript/web/pentaho/lang/Base.js, line 898

Parameters:
Name Default Value Summary
instSpecs : function | Object

The instance-side specifications to mix-in.

Returns:
Name Description
Class.<pentaho.lang.Base>

This class.

See also: pentaho.lang.Base.implementStatic , pentaho.lang.Base.mix

implementStatic(classSpecs) : Class.<pentaho.lang.Base>
Static

Adds static specifications to this class.

This method does not create a new class.

Each class-side/static specification can be a class or an object. When it is a class, only its class-side is mixed-in.

Source: javascript/web/pentaho/lang/Base.js, line 946

Parameters:
Name Default Value Summary
classSpecs : function | object | Nully
Repeatable

The class-side specifications to mix-in.

Returns:
Name Description
Class.<pentaho.lang.Base>

This class.

mix(instSpec, classSpec, keyArgs) : Class.<pentaho.lang.Base>
Static

Adds additional members to, or overrides existing ones of, this class.

This method does not create a new class.

This method supports two signatures:

  1. mix(Class: function[, keyArgs: Object]) - mixes-in the given class, both its instance and class sides.

  2. mix(instSpec: Object[, classSpec: Object[, keyArgs: Object]]) - mixes-in the given instance and class side specifications.

Source: javascript/web/pentaho/lang/Base.js, line 745

Parameters:
Name Default Value Summary
instSpec : function | Object

The class to mixin or the instance-side specification.

classSpec : object
Optional

The class-side specification.

keyArgs : object
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
exclude : object
Optional

A set of property names to exclude, both from the instance and class sides. Properties can have any value.

Returns:
Name Description
Class.<pentaho.lang.Base>

This class.

to(value, other) : pentaho.lang.Base.Array
Static

Converts a value to an instance of this class, or throws if that is impossible.

When value is Nully, and empty array instance of this class is created and returned.

When value is an instance of this type, it is returned.

When value is an instance of Array, it converts it to an instance of this array class, by changing it prototype and calling this class' constructor on it, along with the remaining arguments specified. Note that, in this case, value is mutated!

Arrays of a certain sub-class cannot be newed up (in ES5, at least). As such, a normal array must be created first and then "switched" to inheriting from this class: var baseArray = BaseArray.to([]);.

Source: javascript/web/pentaho/lang/Base.js, line 707

Parameters:
Name Default Value Summary
value : pentaho.lang.Base.Array | Array

The value to be converted.

other : *
Repeatable

Remaining arguments passed alongside value to the class constructor.

Returns:
Name Description
pentaho.lang.Base.Array

The converted value.

Throws:
Name Description
Error

When value cannot be converted.

extend(source, keyArgs) : object

Extend an object with the properties of another.

Methods that are overridden are accessible through this.base.

This object is extended, but its class doesn't change.

Source: javascript/web/pentaho/lang/Base.js, line 1040

Parameters:
Name Default Value Summary
source : object

The instance specification.

keyArgs : object
Optional

The keyword arguments.

Parameters:
Name Default Value Summary
exclude : object
Optional

A map of property names to exclude from source.

Returns:
Name Description
object

This object.