@Override
    public boolean contains(Object o) {
        if (o instanceof Integer) {
            int value = (Integer) o;
            return value >= from && value < to;
        }
        return false;
    }
@Test
    void testContains() {
        RangeSet rangeSet = new RangeSet(5, 10);
        assertTrue(rangeSet.contains(5));
        assertTrue(rangeSet.contains(9));
        assertFalse(rangeSet.contains(10));
        assertFalse(rangeSet.contains(4));
    }