You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Represents whether the amount per target distribution has changed. This may happen if a target doesn't need as much as we are willing to offer it in the split.
11
+
*/
6
12
publicbooleanamountPerChanged = false;
13
+
/**
14
+
* Determines whether the number of targets to split amount should be decreased.
15
+
*
16
+
* @implNote This is only set to false briefly when handling accepting contents with remainders to allow them to accept some of the contents without being marked as
17
+
* fully accounted for.
18
+
*/
7
19
protectedbooleandecrementTargets = true;
8
20
9
21
protectedSplitInfo(inttotalTargets) {
10
22
this.toSplitAmong = totalTargets;
11
23
}
12
24
25
+
/**
26
+
* Marks the given amount as being accounted for and "sent". Decrements {@link #getUnsent() how much we have left to send} and increments
27
+
* {@link #getTotalSent() how much we have sent}. If {@link #decrementTargets} is true, this also will reduce the number of targets to split among, and recalculate
28
+
* how much we can provide each target.
29
+
*
30
+
* @param amountNeeded Amount needed by the target and that we are accounting as having been sent to the target.
31
+
*/
13
32
publicabstractvoidsend(TYPEamountNeeded);
14
33
34
+
/**
35
+
* {@return the "share" each target should get when distributing in an even split}
36
+
*/
15
37
publicabstractTYPEgetShareAmount();
16
38
39
+
/**
40
+
* Gets the "share" including a potential remainder that targets should get when handling remainders. This is used for actually sending providing the split share to
41
+
* any targets that can accept more than we are able to offer in an even split. In general this number will either be equal to {@link #getShareAmount()} or greater
42
+
* than it by one while we still have an excess remainder.
43
+
*
44
+
* @return the "share" plus any potential remainder.
45
+
*/
17
46
publicabstractTYPEgetRemainderAmount();
18
47
48
+
/**
49
+
* {@return the amount of contents that has not been sent anywhere yet}
50
+
*/
19
51
publicabstractTYPEgetUnsent();
20
52
53
+
/**
54
+
* {@return true if the value is equal to zero}
55
+
*
56
+
* @param value Value to check
57
+
*/
21
58
publicabstractbooleanisZero(TYPEvalue);
22
59
60
+
/**
61
+
* {@return the total amount of contents that have been sent}
0 commit comments