refactor trimmers to their own files

This commit is contained in:
zzz
2012-08-29 14:05:02 +00:00
parent d05f1ca2c8
commit d2a7af2884
9 changed files with 99 additions and 69 deletions

View File

@@ -53,7 +53,7 @@ class KBucketImpl<T extends SimpleDataStructure> implements KBucket<T> {
/** include if no bits higher than this bit (inclusive) are set */
private final int _end;
private final int _max;
private final KBucketSet.KBucketTrimmer _trimmer;
private final KBucketTrimmer _trimmer;
/** when did we last shake things up */
private long _lastChanged;
private final I2PAppContext _context;
@@ -62,7 +62,7 @@ class KBucketImpl<T extends SimpleDataStructure> implements KBucket<T> {
* All entries in this bucket will have at least one bit different
* from us in the range [begin, end] inclusive.
*/
public KBucketImpl(I2PAppContext context, int begin, int end, int max, KBucketSet.KBucketTrimmer trimmer) {
public KBucketImpl(I2PAppContext context, int begin, int end, int max, KBucketTrimmer trimmer) {
if (begin > end)
throw new IllegalArgumentException(begin + " > " + end);
_context = context;