1

I'm really anal about what I name my classes, and I need an adjective for both something that is only allowed to happen once, as well as something that is allowed to happen multiple times.

examples:

  • wordthatmeansitcanonlyhappenonceTrigger
  • wordthatmeansitcanhappenmultipletimesTrigger
Hank Gay
  • 70,339
  • 36
  • 160
  • 222
Daniel Schaffer
  • 56,753
  • 31
  • 116
  • 165

14 Answers14

9

OneShotTrigger and RecurringTrigger

Morendil
  • 3,918
  • 20
  • 22
2

For one time: nonce.

Patrick McElhaney
  • 57,901
  • 40
  • 134
  • 167
1

OneShotTrigger
RepeatableTrigger

AShelly
  • 34,686
  • 15
  • 91
  • 152
1

How about

  • SingularTrigger
  • PluralTrigger

Also, I don't think this is exactly what you're getting at, but this may be related to Idempotence.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
1

With tongue ever so slightly in cheek, how about:

  • BirthTrigger - you only get born once.
  • BirthdayTrigger - but you can have lots of birthdays
Paul Dixon
  • 295,876
  • 54
  • 310
  • 348
1

singleTrigger
multiTrigger

-Adam

Adam Davis
  • 91,931
  • 60
  • 264
  • 330
0

I know this is an old post, but I have a suggestion not yet mention.

As a pair

UnrepeatableTrigger
RepeatableTrigger

work well.

Though, much like Microsoft, when using the registry to ensure that things happen only once on startup, they use the term RunOnce.

So instantly, I would recognize

RunOnceTrigger

as being something more maintainable and clear than

OnceTrigger

OneShotTrigger almost sounds desperate "we've only got one shot at this and if it fails we're up the creek without a paddle".

Monochronic and Polychronic do not seem to be relevant, as mentioned here.

Monochronic and polychronic time systems are two terms used to refer to time and its influence on society.

monochronic time system means that things are done one at a time and time is segmented into precise, small units.

Here are some other adjectives.. I particularly like Unrepeatable just beause it sounds like you're talking about a family taboo, or Voldermort.

http://www.macmillandictionary.com/thesaurus-category/american/Happening-only-once

GilesDMiddleton
  • 2,279
  • 22
  • 31
0

I usually use 'OneTime' for the single shot, and nothing particular for the multiple case. It's not really canonical though...

Andrew Rollings
  • 14,340
  • 7
  • 51
  • 50
0

onceTrigger, manyTrigger

oneTrigger, manyTrigger

Also, sometimes I just don't name one (once or many) and name the other (once or many) to make it stand out. Maybe you could just put an 's' on the end of one and not the other.

Jas Panesar
  • 6,597
  • 3
  • 36
  • 47
  • I ry to distinguish between plurals and singlular a lot in my methods. E.g. createPost() and fetchPosts(...) – Ross Feb 05 '09 at 19:11
0

I just use "OneTime." Maybe it's a poker thing.

Yes - that Jake.
  • 16,725
  • 14
  • 70
  • 96
0

You could call them WyclefJeanTrigger and TimMcGrawTrigger. ;-)

Patrick McElhaney
  • 57,901
  • 40
  • 134
  • 167
0

Singular or Once

John Nilsson
  • 17,001
  • 8
  • 32
  • 42
0

SingleShot and Repeating are commonly used.

Pete Kirkham
  • 48,893
  • 5
  • 92
  • 171
0

MonochronicTrigger
PolychronicTrigger

chaos
  • 122,029
  • 33
  • 303
  • 309