internal

package
v0.0.0-...-b99fd8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set struct {
	// contains filtered or unexported fields
}

Set type This implementation is faster than slices or arrays because it internally uses map to store the data All the values stored as the keys in the map and value is dummy boolean, just a place holder. It stores the Unique elements only

func NewSet

func NewSet() *Set

NewSet creates and returns new set

func (*Set) Add

func (s *Set) Add(value interface{})

Add adds the value to the Set

func (*Set) Contains

func (s *Set) Contains(value interface{}) bool

Contains checks if the value exists in the Set and returns true if exists

func (*Set) GetAll

func (s *Set) GetAll() []interface{}

GetAll returns all the values as Array

func (*Set) GetAllAsString

func (s *Set) GetAllAsString() []string

GetAllAsString returns the values as Array of string

func (*Set) GetAllWithCap

func (s *Set) GetAllWithCap(cap int) []interface{}

GetAllWithCap returns the data in set with max data return limit

func (*Set) Remove

func (s *Set) Remove(value interface{})

Remove the value from the Set

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL