Skip to content

Instantly share code, notes, and snippets.

@avchugaev
Created November 13, 2018 17:46
Show Gist options
  • Save avchugaev/d469fdf9a02f2e498bc0945704a2da4b to your computer and use it in GitHub Desktop.
Save avchugaev/d469fdf9a02f2e498bc0945704a2da4b to your computer and use it in GitHub Desktop.
import {List, ArrayList} from '@monument/core';
const vegetables: List<string> = new ArrayList(['potato', 'tomato', 'cucumber']);
vegetables.getAt(0); // "potato"
vegetables.setAt(0, 'carrot'); // "potato"
vegetables.indexOf('cucumber'); // 2
vegetables.contains('cucumber'); // true
vegetables.containsAll(['cucumber', 'tomato']); // true
vegetables.insert(0, 'potato'); // true
vegetables.insertAll(0, ['beet']); // true
vegetables.removeAt(0); // "beet"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment