class User {

    public void addAccessInterval(AccessInterval interval) throws IllegalArgumentException {
        Objects.requireNonNull(interval);

        if(!this.equals(interval.getUser())) {
            throw new IllegalArgumentException("Interval instance belongs to a different or no user!");
        }

        accessIntervals.add(interval);
    }

    public  User(String userId);
    protected  User();

}