Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitMapSwitchByMap ¶
type BitMapSwitchByMap struct {
// contains filtered or unexported fields
}
func (*BitMapSwitchByMap) IsOn ¶
func (b *BitMapSwitchByMap) IsOn(switchIndex int) bool
IsOn 检查指定位置的开关状态
func (*BitMapSwitchByMap) TurnOff ¶
func (b *BitMapSwitchByMap) TurnOff(switchIndex int)
TurnOff 关闭指定位置的开关
func (*BitMapSwitchByMap) TurnOn ¶
func (b *BitMapSwitchByMap) TurnOn(switchIndex int)
TurnOn 打开指定位置的开关
type BitMapSwitchForSlice ¶
type BitMapSwitchForSlice struct {
// contains filtered or unexported fields
}
func NewBitMapSwitch ¶
func NewBitMapSwitch(numSwitches int) *BitMapSwitchForSlice
NewBitMapSwitch 初始化位图开关 numSwitches: 初始化需要指定位图大小,避免无限制扩容
func (*BitMapSwitchForSlice) IsOn ¶
func (b *BitMapSwitchForSlice) IsOn(switchIndex int) bool
IsOn 检查指定位置的开关状态
func (*BitMapSwitchForSlice) TurnOff ¶
func (b *BitMapSwitchForSlice) TurnOff(switchIndex int)
TurnOff 关闭指定位置的开关
func (*BitMapSwitchForSlice) TurnOn ¶
func (b *BitMapSwitchForSlice) TurnOn(switchIndex int)
TurnOn 打开指定位置的开关
Click to show internal directories.
Click to hide internal directories.