github.com/tursom/GoCollections@v0.3.10/collections/Queue.go (about)

     1  /*
     2   * Copyright (c) 2022 tursom. All rights reserved.
     3   * Use of this source code is governed by a GPL-3
     4   * license that can be found in the LICENSE file.
     5   */
     6  
     7  package collections
     8  
     9  import (
    10  	"github.com/tursom/GoCollections/exceptions"
    11  	"github.com/tursom/GoCollections/lang"
    12  )
    13  
    14  type (
    15  	Queue[T lang.Object] interface {
    16  		MutableIterable[T]
    17  
    18  		Offer(element T) exceptions.Exception
    19  		OfferAndGetNode(element T) (QueueNode[T], exceptions.Exception)
    20  		Poll() (T, exceptions.Exception)
    21  	}
    22  
    23  	QueueNode[T lang.Object] StackNode[T]
    24  )