0.1.0 • Published 10 years ago

array_extras v0.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
10 years ago

NOTE: I don't know what I'm doing. Sorry for any inconvenience.

To be quite honest, I always forget the stupid little quirks of JavaScript arrays, and I hate having to re-learn them every time I return to web work. I do, however, spend a lot of time in Java, and the ArrayList has become my good friend...so good, in fact, that I've attempted to implement about 99% of it in JavaScript here.

A few of the methods from the Java ArrayList class have intentionally not been implemented for reasons of JavaScript: iterator(), listIterator(), and toArray(). On the other hand, I've added a toSet() method. Please read the Java documentation for more details about what each method does.

Here's the API:

Return TypeNameParameters
booleanadd(index, object)
booleanaddAll(index, objects)
undefinedclear()
arrayclone()
booleancontains(object)
undefinedensureCapacity(capacity)
objectget(index)
integerindexOf(object)
booleanisEmpty()
integerlastIndexOf(object)
objectremove(object)
booleanremoveAll(objects)
undefinedremoveRange(startIndex, endIndex)
booleanretainAll(objects)
undefinedset(index, object)
integersize()
arraysubList(start, end)
arraytoSet()
undefinedtrimToSize(size)
0.1.0

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago