基于 golang 实现的泛型数组,支持动态扩容等特性。
.
├── README.md
├── array.go //实现
├── array_test.go //测试用例
└── example_array_test.go //使用例子
-
GetCapacity
获取数组容量 -
GetSize
获取数组长度 -
IsEmpty
判断数组是否为空 -
AddFirst
向数组头插入元素 -
AddLast
向数组尾插入元素 -
Add
在索引位置插入元素 -
Get
获取索引元素 -
Set
修改索引位置元素 -
Contains
查找数组中是否有元素 -
Find
通过索引查找数组,索引范围[0,n-1](未找到,返回 -1) -
Remove
删除 index 位置的元素,并返回 -
RemoveFirst
删除数组首个元素 -
RemoveLast
删除末尾元素 -
RemoveElement
从数组中删除指定元素 -
Clear
清空数组 -
PrintIn
打印格式化