Skip to content

Commit fe33c58

Browse files
author
patched.codes[bot]
committed
Patched tests/cicd/generate_docstring/java_test_file.java
1 parent 8033c28 commit fe33c58

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/cicd/generate_docstring/java_test_file.java

+20
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
class Test {
2+
/**
3+
* Computes 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 mapped key values.
15+
* Uses a provided key mapping function to determine the comparable value
16+
* for each object and returns an integer based on their comparison.
17+
*
18+
* @param keymap A function that takes an object and returns a comparable key value.
19+
* @param a The first object to be compared.
20+
* @param b The second object to be compared.
21+
* @return An integer indicating the comparison result:
22+
* -1 if the key value of 'a' is less than the key value of 'b',
23+
* 1 if the key value of 'a' is greater than the key value of 'b',
24+
* and 0 if both key values 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)