package city;

import utils.Helper;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Intersection {
    public Date nextTime;
    public int calls = 0;
    public int index;
    final static int MAX_CALLS = 4;

    public List<Integer> connections = new ArrayList<Integer>();

    public Intersection(int index, List<Integer> connections) {
        this.index = index;
        this.connections = connections;
    }

    public Intersection() {
    }

//    public void nextTime(Date currentTime){
//        if(calls < MAX_CALLS)
//            this.nextTime = Helper.nextCall(currentTime);
//        else
//            this.nextTime = null;
//    }

    public void receiveCall() {
        this.calls++;
    }

    @Override
    public String toString() {
        return "Intersection{" +
                "nextTime=" + nextTime +
                ", calls=" + calls +
                ", index=" + index +
                ", connections=" + connections +
                '}';
    }

}

@@ -136,34 +136,8 @@
 n %7B%0A
-    public Date nextTime;%0A
     
@@ -183,44 +183,8 @@
 dex;
-%0A    final static int MAX_CALLS = 4;
 %0A%0A  
@@ -425,205 +425,8 @@
  %7D%0A%0A
-//    public void nextTime(Date currentTime)%7B%0A//        if(calls %3C MAX_CALLS)%0A//            this.nextTime = Helper.nextCall(currentTime);%0A//        else%0A//            this.nextTime = null;%0A//    %7D%0A
 %0A   

Clean intersection class. Moved method to Main class and not intersection