OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2012 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 return this[this.length - 1]; | 756 return this[this.length - 1]; |
757 } | 757 } |
758 }); | 758 }); |
759 | 759 |
760 (function(){ | 760 (function(){ |
761 | 761 |
762 /** | 762 /** |
763 * @param {!Array.<T>} array1 | 763 * @param {!Array.<T>} array1 |
764 * @param {!Array.<T>} array2 | 764 * @param {!Array.<T>} array2 |
765 * @param {function(T,T):number} comparator | 765 * @param {function(T,T):number} comparator |
| 766 * @param {boolean} mergeNotIntersect |
766 * @return {!Array.<T>} | 767 * @return {!Array.<T>} |
767 * @template T | 768 * @template T |
768 */ | 769 */ |
769 function mergeOrIntersect(array1, array2, comparator, mergeNotIntersect) | 770 function mergeOrIntersect(array1, array2, comparator, mergeNotIntersect) |
770 { | 771 { |
771 var result = []; | 772 var result = []; |
772 var i = 0; | 773 var i = 0; |
773 var j = 0; | 774 var j = 0; |
774 while (i < array1.length && j < array2.length) { | 775 while (i < array1.length && j < array2.length) { |
775 var compareValue = comparator(array1[i], array2[j]); | 776 var compareValue = comparator(array1[i], array2[j]); |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1673 this._outgoingCallback(); | 1674 this._outgoingCallback(); |
1674 } | 1675 } |
1675 } | 1676 } |
1676 | 1677 |
1677 /** | 1678 /** |
1678 * @param {*} value | 1679 * @param {*} value |
1679 */ | 1680 */ |
1680 function suppressUnused(value) | 1681 function suppressUnused(value) |
1681 { | 1682 { |
1682 } | 1683 } |
OLD | NEW |