cangjie-std-arraylist

Document Cangjie's standard library ArrayList<T> operations and usage examples.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-std-arraylist-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-std-arraylist
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/arraylist
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-std-arraylist-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to using Cangjie's ArrayList<T> type, enabling efficient management of dynamic collections of data.

Core Features & Use Cases

  • Dynamic Sizing: Automatically handles resizing as elements are added or removed.
  • Comprehensive Operations: Covers construction, element access (indexed and safe get), addition, deletion, capacity management, slicing, cloning, and conversion to arrays.
  • Use Case: When developing a feature that requires storing a list of user inputs that can grow or shrink, ArrayList is the go-to collection. This Skill helps you use it correctly for all common operations.

Quick Start

Import the ArrayList type and create a new ArrayList of integers.

Frequently Asked Questions about cangjie-std-arraylist

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I initialize a dynamic ArrayList in Cangjie?

To initialize an ArrayList in Cangjie, import the collection type and create a new instance, optionally configuring initial parameters. This dynamic array automatically handles resizing as elements are added or removed.

What is the best way to manage dynamic collections of data in Cangjie?

Using the Cangjie ArrayList is the standard approach for managing dynamic collections. It provides comprehensive operations including element addition, deletion, indexed access, and automatic resizing for growing or shrinking lists.

Can I convert an ArrayList to an Array or slice it in Cangjie?

Yes, Cangjie ArrayList supports conversion to a standard Array and allows slicing. You can extract specific portions of the dynamic array or convert the entire collection to match downstream format requirements.

How does capacity control work for an ArrayList in Cangjie?

Capacity control in Cangjie ArrayList allows you to manage the underlying memory allocation separately from the element count. You can adjust capacity to optimize performance when handling large dynamic lists.

Does Cangjie ArrayList support safe element access and iteration?

Cangjie ArrayList supports safe element retrieval via the get method, indexed access, and iteration. These features ensure secure and efficient traversal when handling dynamic collections of data.