Skip to content

Commit 3740728

Browse files
author
patched.codes[bot]
committed
Patched tests/cicd/generate_docstring/java_test_file.java
1 parent 7df446e commit 3740728

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/cicd/generate_docstring/java_test_file.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
class Test {
2+
/**
3+
* Calculates 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.
8+
*/
29
public static int a_plus_b(Integer a, Integer b) {
310
return a + b;
411
}
512

13+
/**
14+
* Compares two objects based on their keys mapped by a specified key mapping function.
15+
*
16+
* @param keymap A function that maps an object to a comparable value.
17+
* @param a The first object to be compared.
18+
* @param b The second object to be compared.
19+
* @return An integer representing the comparison result: -1 if the key of 'a' is less than the key of 'b',
20+
* 1 if the key of 'a' is greater than the key of 'b', and 0 if the keys are equal.
21+
*/
22+
623
public static int a_plus_b(Function<Object, Comparable> keymap, object a, Object b) {
724
if (keymap(a) < keymap(b)) {
825
return -1;

0 commit comments

Comments
 (0)