2021-05-21 23:07:48 +08:00
|
|
|
package collections
|
|
|
|
|
2022-03-21 11:02:41 +08:00
|
|
|
import (
|
|
|
|
"github.com/tursom/GoCollections/exceptions"
|
|
|
|
"github.com/tursom/GoCollections/lang"
|
|
|
|
)
|
2021-05-21 23:07:48 +08:00
|
|
|
|
2022-03-21 11:02:41 +08:00
|
|
|
type Queue[T lang.Object] interface {
|
2021-05-21 23:07:48 +08:00
|
|
|
// Iterator MutableIterable
|
2022-03-21 11:02:41 +08:00
|
|
|
Iterator() Iterator[T]
|
2021-05-21 23:07:48 +08:00
|
|
|
// MutableIterator MutableIterable
|
2022-03-21 11:02:41 +08:00
|
|
|
MutableIterator() *linkedListIterator[T]
|
2021-05-21 23:07:48 +08:00
|
|
|
|
2022-03-21 11:02:41 +08:00
|
|
|
Push(element T) exceptions.Exception
|
|
|
|
Offer() (T, exceptions.Exception)
|
2021-05-21 23:07:48 +08:00
|
|
|
}
|