@Override
    public boolean isBetween(IKey first, IKey last) {
        first = new KeyImpl(first.getKey().add(BigInteger.ONE).mod(KEY_MAX));
        if (first.equals(this) || last.equals(this))
            return true;

        if (first.comparedTo(last) < 0) {
            if (first.comparedTo(this) < 0 && this.comparedTo(last) < 0)
                return true;
        }

        if (first.comparedTo(last) > 0) {
            if (this.comparedTo(first) > 0 || this.comparedTo(last) < 0)
                return true;
        }

        return false;
    }