varargsオプションパラメータのメソッドで使用しています。メソッドを文書化するための最良の方法について何か提案はありますか?
これは素晴らしく考案された例です:
/**
*
* @param consumption
*     liters of liquid consumed after last pee
* @param options
*   urgency
*       how badly you have to pee on a scale of 1-3,
*       3 being the highest (default 1)
*   bribe
*       what's a toilet worth to you? (default 0)
* @return waitTime
*    minutes until you'll be able to relieve yourself
*/
public integer whenCanIUseTheBathroom(int consumption, int... options){
    // Segment handling options, defining defaults/fallbacks
    int urgency = 1;
    int bribe = 0;
    if(options.length > 0) {
        urgency = options[0];
    }
    if(options.length == 2) {
        bribe = options[1];
    }
    // Segment determining one's fate
    ...
}