net.i2p.kademlia

## Class RejectTrimmer<T extends SimpleDataStructure>

- java.lang.Object
- - net.i2p.kademlia.RejectTrimmer<T>

- Type Parameters:
    `T` - type of SimpleDataStructure objects in the bucket
  All Implemented Interfaces:
    KBucketTrimmer<T>

      public class RejectTrimmer<T extends SimpleDataStructure>
      extends Object
      implements KBucketTrimmer<T>

  Removes nothing and always rejects the add. Flood resistant..

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RejectTrimmer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `trim(KBucket<T> kbucket, T toAdd)` Called from add() just before adding the entry.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RejectTrimmer

          public RejectTrimmer()

  - ### Method Detail

    - #### trim

          public boolean trim(KBucket<T> kbucket,
                              T toAdd)

      Description copied from interface: `KBucketTrimmer`
      Called from add() just before adding the entry. You may call getEntries() and/or remove() from here. Do NOT call add(). To always discard a newer entry, always return false.
      Specified by:
        `trim` in interface `KBucketTrimmer<T extends SimpleDataStructure>`
      Parameters:
        `kbucket` - the kbucket that is now too big
      Returns:
        true to actually add the entry.