private ServicePort shiftOrNull(List<ServicePort> ports) {
        if (!ports.isEmpty()) {
            return ports.remove(0);
        }
        return null;
    }
private ServicePort shiftOrNull(List<ServicePort> ports) {
        if (!ports.isEmpty()) {
            return ports.remove(0);
        }
        return null;
    }
private ServicePort shiftOrNull ( List < ServicePort > ports ) { if ( ! ports . isEmpty ( ) ) { return ports . remove ( 0 ) ; } return null ; }
remove first element of list or null if list is empty
remove first element of list or null if list is empty