Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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