kubernetes/vendor/github.com/antlr4-go/antlr/v4/jcollect.go

type Collectable

type Comparator

type CollectionSource

type CollectionDescriptor

const UnknownCollection

const ATNConfigLookupCollection

const ATNStateCollection

const DFAStateCollection

const ATNConfigCollection

const PredictionContextCollection

const SemanticContextCollection

const ClosureBusyCollection

const PredictionVisitedCollection

const MergeCacheCollection

const PredictionContextCacheCollection

const AltSetCollection

const ReachSetCollection

var CollectionDescriptors

type JStore

func NewJStore[T any, C Comparator[T]](comparator Comparator[T], cType CollectionSource, desc string) *JStore[T, C] {}

// Put will store given value in the collection. Note that the key for storage is generated from
// the value itself - this is specifically because that is what ANTLR needs - this would not be useful
// as any kind of general collection.
//
// If the key has a hash conflict, then the value will be added to the slice of values associated with the
// hash, unless the value is already in the slice, in which case the existing value is returned. Value equivalence is
// tested by calling the equals() method on the key.
//
// # If the given value is already present in the store, then the existing value is returned as v and exists is set to true
//
// If the given value is not present in the store, then the value is added to the store and returned as v and exists is set to false.
func (s *JStore[T, C]) Put(value T) (v T, exists bool) {}

// Get will return the value associated with the key - the type of the key is the same type as the value
// which would not generally be useful, but this is a specific thing for ANTLR where the key is
// generated using the object we are going to store.
func (s *JStore[T, C]) Get(key T) (T, bool) {}

// Contains returns true if the given key is present in the store
func (s *JStore[T, C]) Contains(key T) bool {}

func (s *JStore[T, C]) SortedSlice(less func(i, j T) bool) []T {}

func (s *JStore[T, C]) Each(f func(T) bool) {}

func (s *JStore[T, C]) Len() int {}

func (s *JStore[T, C]) Values() []T {}

type entry

type JMap

func NewJMap[K, V any, C Comparator[K]](comparator Comparator[K], cType CollectionSource, desc string) *JMap[K, V, C] {}

func (m *JMap[K, V, C]) Put(key K, val V) (V, bool) {}

func (m *JMap[K, V, C]) Values() []V {}

func (m *JMap[K, V, C]) Get(key K) (V, bool) {}

func (m *JMap[K, V, C]) Len() int {}

func (m *JMap[K, V, C]) Delete(key K) {}

func (m *JMap[K, V, C]) Clear() {}

type JPCMap

func NewJPCMap(cType CollectionSource, desc string) *JPCMap {}

func (pcm *JPCMap) Get(k1, k2 *PredictionContext) (*PredictionContext, bool) {}

func (pcm *JPCMap) Put(k1, k2, v *PredictionContext) {}

type JPCMap2

type JPCEntry

func NewJPCMap2(cType CollectionSource, desc string) *JPCMap2 {}

func dHash(k1, k2 *PredictionContext) int {}

func (pcm *JPCMap2) Get(k1, k2 *PredictionContext) (*PredictionContext, bool) {}

func (pcm *JPCMap2) Put(k1, k2, v *PredictionContext) (*PredictionContext, bool) {}

type VisitEntry

type VisitRecord

type VisitList

var visitListPool

// NewVisitRecord returns a new VisitRecord instance from the pool if available.
// Note that this "map" uses a pointer as a key because we are emulating the behavior of
// IdentityHashMap in Java, which uses the `==` operator to compare whether the keys are equal,
// which means is the key the same reference to an object rather than is it .equals() to another
// object.
func NewVisitRecord() *VisitRecord {}

func (vr *VisitRecord) Release() {}

func (vr *VisitRecord) Get(k *PredictionContext) (*PredictionContext, bool) {}

func (vr *VisitRecord) Put(k, v *PredictionContext) (*PredictionContext, bool) {}