Giter Club home page Giter Club logo

arraylist-tn's Introduction

ARRAYLIST-TN


Build Status   Coverage Status

You can now use the arraylist in your TypeScript and JavaScript code easily.

Installation


# npm
npm install arraylist-tn
# yarn
yarn add arraylist-tn

Usage


You can use this module like ArrayList in the JAVA .. you don't need to change any thing ..

Support Methods


Please see the list here.

Example


This is a basic example or follow all test cases here:

const ArrayList = require("arraylist-tn"); // || const { ArrayList } = require ('arraylist-tn');

const myList = new ArrayList();
myList.add("imed jaberi");
console.log(myList.getAll()); // [ 'imed jaberi' ]
myList.addAll(["nodejs", "js-lover", "tunisia", "red", "CA"]);
console.log(myList.getAll()); // [ 'imed jaberi', 'nodejs', 'js-lover', 'tunisia', 'red', 'CA' ]
myList.remove(4);
console.log(myList.getAll()); // [ 'imed jaberi', 'nodejs', 'js-lover', 'tunisia', 'CA' ]
console.log(myList.size()); // 5
console.log(myList.contains("CA")); // true
console.log(myList.isEmpty()); // false
myList.removeAll();
myList.addAll([100, 50, -50, 0, -100]);
myList.sort(); // you can add "asc" as params
console.log(myList.getAll()); // [ -100, -50, 0, 50, 100 ]
myList.sort("desc");
console.log(myList.getAll()); // [ 100, 50, 0, -50, -100 ]

License


MIT © Imed Jaberi

arraylist-tn's People

Contributors

3imed-jaberi avatar

Stargazers

 avatar  avatar

arraylist-tn's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.