cangjie-std-arraylist

Document the ArrayList API for dynamic array operations in Cangjie.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-std-arraylist
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-std-arraylist
Source: https://github.com/SunriseSummer/CangjieDocValidator/tree/main/.github/skills/arraylist
Command: npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-std-arraylist

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to using Cangjie's ArrayList<T>, a dynamic array implementation, simplifying data management in your Cangjie programs.

Core Features & Use Cases

  • Detailed API Reference: Covers construction, element manipulation (add, remove, access), capacity management, slicing, sorting, and conversion.
  • Practical Examples: Illustrates common operations like dynamic collection, batch adding, conditional removal, and iteration.
  • Use Case: When you need to efficiently store and manipulate a collection of items whose size is not known beforehand, or when you need to perform operations like sorting, filtering, or dynamic resizing on a list of data.

Quick Start

Use the cangjie-std-arraylist skill to learn how to create a new ArrayList and add elements to it.

Frequently Asked Questions about cangjie-std-arraylist

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

FAQPage Schema
How do I create a dynamic array in Cangjie and add elements to it?

To create a dynamic array in Cangjie, instantiate an ArrayList and use its API to add elements. This provides flexible data management for collections whose size is not known beforehand, supporting dynamic resizing and efficient element manipulation.

What is the best way to manage capacity and remove elements from a Cangjie ArrayList?

Managing capacity and removing elements in a Cangjie ArrayList involves using built-in methods for capacity management and conditional removal. You can dynamically resize the collection, filter specific items, and perform batch operations to efficiently manipulate stored data.

Does Cangjie ArrayList support slicing, sorting, and conversion to other types?

Cangjie ArrayList supports slicing, sorting, and type conversion through its comprehensive standard library API. These features allow you to reorder list elements, extract specific portions of the collection, and transform the dynamic array into other applicable data types.

When do I need to use a dynamic array instead of a fixed-size collection in Cangjie?

You need a dynamic array in Cangjie when storing collections whose size changes dynamically at runtime. ArrayList is applicable for scenarios requiring flexible data structures, enabling efficient element addition, removal, and access without predefined size limits.

Can I iterate over a Cangjie ArrayList and perform batch adding operations?

You can iterate over a Cangjie ArrayList and perform batch adding operations using its standard collection API. This allows for traversing stored elements, sequentially accessing data, and appending multiple items to the dynamic array efficiently.

Why does my Cangjie dynamic array need capacity management during element addition?

Capacity management in a Cangjie dynamic array optimizes memory allocation during element addition. By managing the internal buffer capacity, the ArrayList minimizes reallocation overhead when the collection grows beyond its current storage limits.