1 package tim.prune.tips;
4 * Definition of a tip, including key and whether the tip
5 * has already been shown or not.
6 * This class is only visible within this package
10 /** Key of message to show when fired */
11 private String _messageKey = null;
12 /** Threshold of calls before tip is shown */
13 private int _threshold = 0;
14 /** Number of times this tip has been hit */
15 private int _hitCount = 0;
16 /** Flag whether tip is active or has already been shown */
17 private boolean _active = true;
21 * @param inKey key for message to show
23 TipDefinition(String inKey)
30 * @param inKey message key
31 * @param inThreshold threshold
33 TipDefinition(String inKey, int inThreshold)
36 _threshold = inThreshold;
40 * Hit this definition and check the threshold
41 * @return true if the message should be shown
43 boolean shouldShowMessage()
47 boolean overThreshold = (_hitCount >= _threshold);
52 _active = false; // only fire once
63 String getMessageKey() {