example

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

ContainerListWriter is a base of http://golang.org/pkg/container/list/ this is tuning performancem, reduce heap usage. Copyright 2009 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sample

type Sample struct {
	ID     int
	Name   string
	Parent *SampleParent
	list_head.ListHead
}

func NewSampleList

func NewSampleList(h *Sample) *Sample

New returns an initialized list.

func (*Sample) Add

func (d *Sample) Add(n *Sample) *Sample

func (*Sample) Back

func (d *Sample) Back() *Sample

func (*Sample) ContainOf

func (d *Sample) ContainOf(ptr *list_head.ListHead) *Sample

func (*Sample) Delete

func (d *Sample) Delete() *Sample

func (*Sample) Each

func (l *Sample) Each(fn func(e *Sample))

func (*Sample) Front

func (d *Sample) Front() *Sample

func (*Sample) Init

func (d *Sample) Init()

func (*Sample) InsertAfter

func (l *Sample) InsertAfter(v *Sample) *Sample

InsertAfter inserts a new element e with value v immediately after mark and returns e. If mark is not an element of l, the list is not modified.

func (*Sample) InsertBefore

func (l *Sample) InsertBefore(v *Sample) *Sample

InsertBefore inserts a new element e with value v immediately before mark and returns e. If mark is not an element of l, the list is not modified.

func (*Sample) Len

func (d *Sample) Len() int

func (*Sample) MoveAfter

func (l *Sample) MoveAfter(v *Sample) *Sample

MoveAfter moves element e to its new position after mark. If e is not an element of l, or e == mark, the list is not modified.

func (*Sample) MoveBefore

func (l *Sample) MoveBefore(v *Sample) *Sample

MoveBefore moves element e to its new position before mark. If e or mark is not an element of l, or e == mark, the list is not modified.

func (*Sample) MoveToBack

func (l *Sample) MoveToBack(v *Sample) *Sample

func (*Sample) MoveToFront

func (l *Sample) MoveToFront(v *Sample) *Sample

MoveToFront moves element e to the front of list l. If e is not an element of l, the list is not modified.

func (*Sample) Next

func (d *Sample) Next() *Sample

Next returns the next list element or nil.

func (*Sample) Prev

func (d *Sample) Prev() *Sample

Prev returns the previous list element or nil.

func (*Sample) PushBack

func (l *Sample) PushBack(v *Sample) *Sample

PushBack inserts a new element e with value v at the back of list l and returns e.

func (*Sample) PushBackList

func (l *Sample) PushBackList(other *Sample)

func (*Sample) PushFront

func (d *Sample) PushFront(v *Sample) *Sample

PushFront inserts a new value v at the front of list l and returns e.

func (*Sample) PushFrontList

func (l *Sample) PushFrontList(other *Sample)

func (*Sample) Remove

func (d *Sample) Remove() *Sample

type SampleParent

type SampleParent struct {
	Name string
}

Jump to

Keyboard shortcuts

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