2019-07-24 18:30:55 +00:00
|
|
|
package list
|
|
|
|
|
|
|
|
// IList 通用接口
|
|
|
|
type IList interface {
|
|
|
|
Push(value interface{})
|
|
|
|
Contains(values ...interface{}) bool
|
2019-07-25 09:05:29 +00:00
|
|
|
Index(idx int) (interface{}, bool)
|
|
|
|
Remove(idx int) (result interface{}, isfound bool)
|
2019-07-24 18:30:55 +00:00
|
|
|
Values() []interface{}
|
2019-07-25 03:40:50 +00:00
|
|
|
Traversal(every func(interface{}) bool)
|
2019-07-25 09:05:29 +00:00
|
|
|
String() string
|
2019-07-24 18:30:55 +00:00
|
|
|
|
|
|
|
Clear()
|
|
|
|
Empty() bool
|
|
|
|
Size() uint
|
|
|
|
}
|
|
|
|
|
|
|
|
// ILinkedList 通用接口
|
|
|
|
type ILinkedList interface {
|
|
|
|
PushFront(values ...interface{})
|
|
|
|
PushBack(values ...interface{})
|
|
|
|
PopFront() (result interface{}, found bool)
|
|
|
|
PopBack() (result interface{}, found bool)
|
|
|
|
}
|