diff --git a/ortools/util/java/sorted_interval_list.i b/ortools/util/java/sorted_interval_list.i index 88125ef9b1..806b20e3d6 100644 --- a/ortools/util/java/sorted_interval_list.i +++ b/ortools/util/java/sorted_interval_list.i @@ -34,12 +34,18 @@ %ignore operations_research::SortedDisjointIntervalList::SortedDisjointIntervalList(const std::vector&); %unignore operations_research::SortedDisjointIntervalList::~SortedDisjointIntervalList; -%rename (insertInterval) operations_research::SortedDisjointIntervalList::InsertInterval; +//%rename (insertInterval) operations_research::SortedDisjointIntervalList::InsertInterval; %rename (insertIntervals) operations_research::SortedDisjointIntervalList::InsertIntervals; %rename (numIntervals) operations_research::SortedDisjointIntervalList::NumIntervals; %rename (buildComplementOnInterval) operations_research::SortedDisjointIntervalList::BuildComplementOnInterval; %rename (toString) operations_research::SortedDisjointIntervalList::DebugString; +%extend operations_research::SortedDisjointIntervalList { + void insertInterval(int64_t start, int64_t end) { + $self->InsertInterval(start, end); + } +} + // Make the SWIG-generated constructor public. // This is necessary as it will be called from the sat package. SWIG_JAVABODY_PROXY(/*PTRCTOR_VISIBILITY=*/public,