tags:

views:

177

answers:

13

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
A: 

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

Andrew Rollings
A: 

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
I ry to distinguish between plurals and singlular a lot in my methods. E.g. createPost() and fetchPosts(...)
Ross
A: 

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

Jekke
+1  A: 

OneShotTrigger
RepeatableTrigger

AShelly
+8  A: 

OneShotTrigger and RecurringTrigger

Morendil
especially like the 'Recurring' in that.
xtofl
+1 for Recurring, not so crazy about "OneShot" - maybe I'll just use "NonRecurring"
Daniel Schaffer
"OneShotTrigger" sounds pretty good to me. Perhaps "ResetTrigger" instead of "RecurringTrigger"?
gnovice
+1  A: 

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
+1  A: 

For one time: nonce.

Patrick McElhaney
in the UK the first thing that springs to mind for "nonce" is "sex offender" :)
Paul Dixon
@Paul: I guess I'm sheltered: never heard of that before ;)
Ross
You might go with Trigger and NonceTrigger. Don't see why they both need special names. :-)
Patrick McElhaney
A: 

You could call them WyclefJeanTrigger and TimMcGrawTrigger. ;-)

Patrick McElhaney
A: 

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
A: 

Singular or Once

John Nilsson
A: 

SingleShot and Repeating are commonly used.

Pete Kirkham
+1  A: 

singleTrigger
multiTrigger

Adam Davis
A: 

MonochronicTrigger
PolychronicTrigger

chaos