go.temporal.io/server/common/predicates/not.go

42 LOC · 24 covered · 18 uncovered · 8 ranges · 32 concepts · 8 introducers · 16 tests

File neighbourhood

The centred file is linked to every concept that introduces one of its ranges, every test that runs code from the file, and the gray connector concepts standing between those tests and the file's own introducer concepts. Undirected links join concepts to every file where they introduce source and concepts to the tests they introduce; arrows show specialization between the displayed concepts and bridge only concepts omitted from this view. Concept colors match the source ranges below; connector concepts have no source color and are shown in gray.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the file

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the related-file, concept, and source links on this page.

Focused file, its introducer and connector concepts, their introduced files, and tests that run code from the fileaction_move_group.go ×11 · 84 introduced LOCaction_move_group.go ×11slice.go ×1 · 4 introduced LOCslice.go ×1slice.go ×2 · 13 introduced LOCslice.go ×2convert.go ×4 · 22 introduced LOCconvert.go ×4TestConvertPredicate_And · 0 introduced LOCTestConvertPredicate_AndTestConvertPredicate_Or · 0 introduced LOCTestConvertPredicate_OrTestSplitByPredicate_DifferentPredicateType · 0 introduced LOCTestSplitByPredicate_Dif…convert.go ×10 · 56 introduced LOCconvert.go ×10TestSplitByPredicate_SamePredicateType · 0 introduced LOCTestSplitByPredicate_Sam…scope.go ×1 · 11 introduced LOCscope.go ×1predicates.go ×7 · 35 introduced LOCpredicates.go ×7predicates.go ×3 · 36 introduced LOCpredicates.go ×3predicates.go ×1 · 1 introduced LOCpredicates.go ×1predicates.go ×1 · 2 introduced LOCpredicates.go ×1predicates.go ×2 · 5 introduced LOCpredicates.go ×2predicates.go ×1 · 2 introduced LOCpredicates.go ×1predicates.go ×7 · 20 introduced LOCpredicates.go ×7predicates.go ×3 · 7 introduced LOCpredicates.go ×3and.go ×1 · 2 introduced LOCand.go ×1or.go ×1 · 2 introduced LOCor.go ×1and.go ×2 · 4 introduced LOCand.go ×2and.go ×1 · 1 introduced LOCand.go ×1TestUniversal_Equals · 0 introduced LOCTestUniversal_Equalsempty.go ×1 · 4 introduced LOCempty.go ×1not.go ×1 · 6 introduced LOCnot.go ×1not.go ×1 · 2 introduced LOCnot.go ×1not.go ×1 · 2 introduced LOCnot.go ×1not.go ×1 · 2 introduced LOCnot.go ×1not.go ×1 · 3 introduced LOCnot.go ×1not.go ×1 · 3 introduced LOCnot.go ×1not.go ×1 · 4 introduced LOCnot.go ×1not.go ×1 · 2 introduced LOCnot.go ×1TestAnd_Equals · introduced test · go.temporal.io/server/common/predicates/TestAndSuite/TestAnd_EqualsTestAnd_EqualsTestEmpty_Equals · introduced test · go.temporal.io/server/common/predicates/TestNoneSuite/TestEmpty_EqualsTestEmpty_EqualsTestNot_Equals · introduced test · go.temporal.io/server/common/predicates/TestNotSuite/TestNot_EqualsTestNot_EqualsTestNot_Size · introduced test · go.temporal.io/server/common/predicates/TestNotSuite/TestNot_SizeTestNot_SizeTestNot_Test · introduced test · go.temporal.io/server/common/predicates/TestNotSuite/TestNot_TestTestNot_TestTestOr_Equals · introduced test · go.temporal.io/server/common/predicates/TestOrSuite/TestOr_EqualsTestOr_EqualsTestUniversal_Equals · introduced test · go.temporal.io/server/common/predicates/TestUniversalSuite/TestUniversal_EqualsTestUniversal_EqualsTestConvertPredicate_And · introduced test · go.temporal.io/server/service/history/queues/TestConvertSuite/TestConvertPredicate_AndTestConvertPredicate_AndTestConvertPredicate_Not · introduced test · go.temporal.io/server/service/history/queues/TestConvertSuite/TestConvertPredicate_NotTestConvertPredicate_NotTestConvertPredicate_Or · introduced test · go.temporal.io/server/service/history/queues/TestConvertSuite/TestConvertPredicate_OrTestConvertPredicate_OrTestCheckPoint_MoveTaskGroupAction · introduced test · go.temporal.io/server/service/history/queues/TestQueueBaseSuite/TestCheckPoint_MoveTaskGroupActionTestCheckPoint_MoveTaskG…TestSplitByPredicate_DifferentPredicateType · introduced test · go.temporal.io/server/service/history/queues/TestScopeSuite/TestSplitByPredicate_DifferentPredicateTypeTestSplitByPredicate_Dif…TestSplitByPredicate_SamePredicateType · introduced test · go.temporal.io/server/service/history/queues/TestScopeSuite/TestSplitByPredicate_SamePredicateTypeTestSplitByPredicate_Sam…TestSplitByPredicate · introduced test · go.temporal.io/server/service/history/queues/TestSliceSuite/TestSplitByPredicateTestSplitByPredicateTestAndPredicates · introduced test · go.temporal.io/server/service/history/tasks/TestPredicateSuite/TestAndPredicatesTestAndPredicatesTestOrPredicates · introduced test · go.temporal.io/server/service/history/tasks/TestPredicateSuite/TestOrPredicatesTestOrPredicatesFocused file · go.temporal.io/server/common/predicates/not.go · 42 LOCpredicates/not.go

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the related-file, concept, and source links on this page while the interactive map is unavailable.

1 package predicates
2
3 type (
4 NotImpl[T any] struct {
5 Predicate Predicate[T]
6 }
7 )
8
9 func Not[T any](
10 predicate Predicate[T],
11 > ) Predicate[T] { not.go ×1
12 > switch p := predicate.(type) {
13 > case *NotImpl[T]: not.go ×1
14 > return p.Predicate
15 > case *UniversalImpl[T]: not.go ×1
16 > return Empty[T]()
17 > case *EmptyImpl[T]: not.go ×1
18 > return Universal[T]()
19 > default: not.go ×1
20 > return &NotImpl[T]{
21 > Predicate: predicate,
22 > }
23 }
24 }
25
26 > func (n *NotImpl[T]) Test(t T) bool { not.go ×1
27 > return !n.Predicate.Test(t)
28 > }
29
30 func (n *NotImpl[T]) Equals(
31 predicate Predicate[T],
32 > ) bool { not.go ×1
33 > notPredicate, ok := predicate.(*NotImpl[T])
34 > if !ok {
35 > return false
36 > }
37 > return n.Predicate.Equals(notPredicate.Predicate)
38 }
39
40 > func (n *NotImpl[T]) Size() int { not.go ×1
41 > return n.Predicate.Size() + EmptyPredicateProtoSize
42 > }