@@ -394,19 +394,33 @@ public static Labels prettify(final Labels labels, final LabelSettings labelSett
394394 *
395395 * @param labels Map with label-name mapped to label-value pairs.
396396 * @return New instance of {@link Labels}.
397- * @since 1.0.0
397+ * @since 1.0.1
398398 */
399- public static Labels make (final Map <String , String > labels ) {
399+ public static Labels of (final Map <String , String > labels ) {
400400 return new Labels (labels );
401401 }
402402
403403 /**
404- * Creates a new empty labels instance .
404+ * Creates labels containing single name-value pair. Call {@link #l(String, String)} method to add more labels .
405405 *
406+ * @param name Label name. Valid label identifier starts with letter and contains only letters, digits or '_'.
407+ * @param value Label value. Valid label identifier starts with letter and contains only letters, digits or '_'.
406408 * @return New instance of {@link Labels}.
407- * @since 1.0.0
409+ * @see #l(String, String)
410+ * @since 1.0.1
408411 */
409- public static Labels make () {
412+ public static Labels of (final String name , final String value ) {
413+ return new Labels ().l (name , value );
414+ }
415+
416+ /**
417+ * Creates a new empty labels instance. Call {@link #l(String, String)} method to add any labels.
418+ *
419+ * @return New instance of {@link Labels}.
420+ * @see #l(String, String)
421+ * @since 1.0.1
422+ */
423+ public static Labels of () {
410424 return new Labels ();
411425 }
412426
@@ -479,16 +493,14 @@ public String toString() {
479493 /**
480494 * Add a new label and return this object.
481495 *
482- * @param labelName Label name. Valid label identifier starts with letter and contains only letters, digits or
483- * '_'.
484- * @param labelValue Label value. Valid label identifier starts with letter and contains only letters, digits or
485- * '_'.
496+ * @param name Label name. Valid label identifier starts with letter and contains only letters, digits or '_'.
497+ * @param value Label value. Valid label identifier starts with letter and contains only letters, digits or '_'.
486498 * @return This object with added label.
487- * @throws RuntimeException when given <code>labelName </code> or <code>labelValue </code> is null or empty.
499+ * @throws RuntimeException when given <code>name </code> or <code>value </code> is null or empty.
488500 * @since 0.1.22
489501 */
490- public Labels l (final String labelName , final String labelValue ) {
491- map .put (labelName , labelValue );
502+ public Labels l (final String name , final String value ) {
503+ map .put (name , value );
492504 return this ;
493505 }
494506
0 commit comments