sset

package
v0.0.0-...-0ce9163 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2018 License: Apache-2.0 Imports: 0 Imported by: 0

README

package sset

import "github.com/vivint/rothko/database/files/internal/sset"

package sset implements a sorted set of strings.

Usage

type Set
type Set struct {
}

Set represents an ordered set of strings.

func New
func New(cap int) *Set

New constructs a Set with the given initial capacity.

func (*Set) Add
func (s *Set) Add(x string)
func (*Set) Copy
func (s *Set) Copy() *Set

Copy returns a copy of the set.

func (*Set) Has
func (s *Set) Has(x string) bool

Has returns if the set has the key.

func (*Set) Iter
func (s *Set) Iter(cb func(name string) bool)

Iter iterates over all of the keys in the set.

func (*Set) Len
func (s *Set) Len() int

Len returns the amount of elements in the set.

func (*Set) Merge
func (s *Set) Merge(o *Set)

Merge inserts all of the values in o into the set.

Documentation

Overview

package sset implements a sorted set of strings.

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 represents an ordered set of strings.

func New

func New(cap int) *Set

New constructs a Set with the given initial capacity.

func (*Set) Add

func (s *Set) Add(x string)

func (*Set) Copy

func (s *Set) Copy() *Set

Copy returns a copy of the set.

func (*Set) Has

func (s *Set) Has(x string) bool

Has returns if the set has the key.

func (*Set) Iter

func (s *Set) Iter(cb func(name string) bool)

Iter iterates over all of the keys in the set.

func (*Set) Len

func (s *Set) Len() int

Len returns the amount of elements in the set.

func (*Set) Merge

func (s *Set) Merge(o *Set)

Merge inserts all of the values in o into the set.

Jump to

Keyboard shortcuts

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