How to Document Generic Type Parameter (#15108)

* How to Documeny Generic Type Parameters

* How to Documeny Generic Type Parameters
This commit is contained in:
Michael Olayemi 2023-11-03 05:15:06 +01:00 committed by GitHub
parent 57840bb083
commit 4c06d8e9f9
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package com.baeldung.generictype;
/**
* @param <T> The type of the first value in the {@code Pair<T,S>}.
* @param <S> The type of the second value in the {@code Pair<T,S>}.
*/
public class Pair<T, S> {
public T first;
public S second;
/**
* Constructs a new Pair object with the specified values.
*
* @param a The first value.
* @param b The second value.
*/
public Pair(T a, S b) {
first = a;
second = b;
}
}