Skip to content

Instantly share code, notes, and snippets.

Avatar
📚
Working on translate module for Angular

Alex Chugaev avchugaev

📚
Working on translate module for Angular
  • IT SmartFlex
  • Kyiv, Ukraine
View GitHub Profile
View ReadOnlyList.example.ts
import {ReadOnlyList, ArrayList} from '@monument/core';
const vegetables: ReadOnlyList<string> = new ArrayList(['potato', 'tomato', 'cucumber']);
vegetables.getAt(0); // "potato"
vegetables.indexOf('cucumber'); // 2
vegetables.contains('cucumber'); // true
vegetables.containsAll(['cucumber', 'tomato']); // true
View LinkedList.example.ts
import {List, LinkedList} from '@monument/core';
const fruits: List<string> = new LinkedList();
fruits.add('lime'); // true
fruits.addAll(['apple', 'orange', 'banana']); // true
fruits.remove('apple'); // true
fruits.removeAll(['lime', 'orange']); // true
fruits.clear(); // true
View ArrayList.example.ts
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