containers

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Copyright 2020 newtbig Author. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 newtbig Author. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 newtbig Author. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 newtbig Author. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteComparator

func ByteComparator(a, b interface{}) int

func Float32Comparator

func Float32Comparator(a, b interface{}) int

func Float64Comparator

func Float64Comparator(a, b interface{}) int

func GetSortedValues

func GetSortedValues(container Container, comparator Comparator) []interface{}

func Int16Comparator

func Int16Comparator(a, b interface{}) int

func Int32Comparator

func Int32Comparator(a, b interface{}) int

func Int64Comparator

func Int64Comparator(a, b interface{}) int

func Int8Comparator

func Int8Comparator(a, b interface{}) int

func IntComparator

func IntComparator(a, b interface{}) int

func RuneComparator

func RuneComparator(a, b interface{}) int

func Sort

func Sort(values []interface{}, comparator Comparator)

func StringComparator

func StringComparator(a, b interface{}) int

func TimeComparator

func TimeComparator(a, b interface{}) int

func UInt16Comparator

func UInt16Comparator(a, b interface{}) int

func UInt32Comparator

func UInt32Comparator(a, b interface{}) int

func UInt64Comparator

func UInt64Comparator(a, b interface{}) int

func UInt8Comparator

func UInt8Comparator(a, b interface{}) int

func UIntComparator

func UIntComparator(a, b interface{}) int

Types

type Comparator

type Comparator func(a, b interface{}) int

type Container

type Container interface {
	Empty() bool
	Size() int
	Clear()
	Values() []interface{}
}

type IteratorWithIndex

type IteratorWithIndex interface {
	Next() bool
	Value() interface{}
	Index() int
	Begin()
	First() bool
}

type IteratorWithKey

type IteratorWithKey interface {
	Next() bool
	Value() interface{}
	Key() interface{}
	Begin()
	First() bool
}

type ReverseIteratorWithIndex

type ReverseIteratorWithIndex interface {
	Prev() bool
	End()
	Last() bool
	IteratorWithIndex
}

type ReverseIteratorWithKey

type ReverseIteratorWithKey interface {
	Prev() bool
	End()
	Last() bool
	IteratorWithKey
}

Jump to

Keyboard shortcuts

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