NGL@0.10.4 Home Manual Reference Source GalleryRepository
import Store from 'ngl/src/store/store.js'
public interface | source

Store

Store class

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

Empty the store

public

copyFrom(other: Store, thisOffset: Integer, otherOffset: Integer, length: Integer): undefined

Copy data from one store to another

public

copyWithin(thisOffset: Integer, otherOffset: Integer, length: Integer): undefined

Copy data within this store

public

Dispose of the store entries and fields

public

Resize the store to 1.5 times its current size if full

public

Resize the store to the new size

public

sort(compareFunction: [type]): undefined

Sort entries in the store given the compare function

Public Constructors

public constructor(size: Integer) source

Params:

NameTypeAttributeDescription
size Integer
  • optional

initial size

Public Methods

public clear(): undefined source

Empty the store

Return:

undefined

public copyFrom(other: Store, thisOffset: Integer, otherOffset: Integer, length: Integer): undefined source

Copy data from one store to another

Params:

NameTypeAttributeDescription
other Store

store to copy from

thisOffset Integer

offset to start copying to

otherOffset Integer

offset to start copying from

length Integer

number of entries to copy

Return:

undefined

public copyWithin(thisOffset: Integer, otherOffset: Integer, length: Integer): undefined source

Copy data within this store

Params:

NameTypeAttributeDescription
thisOffset Integer

offset to start copying to

otherOffset Integer

offset to start copying from

length Integer

number of entries to copy

Return:

undefined

public dispose(): undefined source

Dispose of the store entries and fields

Return:

undefined

public growIfFull(): undefined source

Resize the store to 1.5 times its current size if full

Return:

undefined

public resize(size: Integer): undefined source

Resize the store to the new size

Params:

NameTypeAttributeDescription
size Integer

new size

Return:

undefined

public sort(compareFunction: [type]): undefined source

Sort entries in the store given the compare function

Params:

NameTypeAttributeDescription
compareFunction [type]

function to sort by

Return:

undefined