Skip to content

Commit e560065

Browse files
author
patched.codes[bot]
committed
Patched tests/cicd/generate_docstring/java_test_file.java
1 parent 5bafb63 commit e560065

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/cicd/generate_docstring/java_test_file.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
class Test {
2+
/**
3+
* Returns the sum of two integers.
4+
*
5+
* @param a The first integer to be added.
6+
* @param b The second integer to be added.
7+
* @return The sum of the two integers a and b.
8+
*/
9+
210
public static int a_plus_b(Integer a, Integer b) {
311
return a + b;
412
}
513

14+
/**
15+
* Compares two objects using a provided key mapping function. The function applies
16+
* the key mapping to both objects and compares the resulting Comparable values.
17+
*
18+
* @param keymap A function that transforms an object into a Comparable object
19+
* for comparison purposes.
20+
* @param a The first object to be compared.
21+
* @param b The second object to be compared.
22+
* @return -1 if the key mapping of object 'a' is less than that of object 'b',
23+
* 1 if the key mapping of object 'a' is greater than that of object 'b',
24+
* or 0 if both are equal.
25+
*/
626
public static int a_plus_b(Function<Object, Comparable> keymap, object a, Object b) {
727
if (keymap(a) < keymap(b)) {
828
return -1;

0 commit comments

Comments
 (0)