jdk/src/java.management/share/classes/javax/management/ImmutableDescriptor.java
changeset 29927 9cc3e111a1d8
parent 25859 3317bb8137f4
equal deleted inserted replaced
29926:2eceae3716d9 29927:9cc3e111a1d8
     1 /*
     1 /*
     2  * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    63             new ImmutableDescriptor();
    63             new ImmutableDescriptor();
    64 
    64 
    65     /**
    65     /**
    66      * Construct a descriptor containing the given fields and values.
    66      * Construct a descriptor containing the given fields and values.
    67      *
    67      *
       
    68      * @param fieldNames the field names
       
    69      * @param fieldValues the field values
    68      * @throws IllegalArgumentException if either array is null, or
    70      * @throws IllegalArgumentException if either array is null, or
    69      * if the arrays have different sizes, or
    71      * if the arrays have different sizes, or
    70      * if a field name is null or empty, or if the same field name
    72      * if a field name is null or empty, or if the same field name
    71      * appears more than once.
    73      * appears more than once.
    72      */
    74      */
    79      * must be of the form {@code fieldName=fieldValue}.  The field name
    81      * must be of the form {@code fieldName=fieldValue}.  The field name
    80      * ends at the first {@code =} character; for example if the String
    82      * ends at the first {@code =} character; for example if the String
    81      * is {@code a=b=c} then the field name is {@code a} and its value
    83      * is {@code a=b=c} then the field name is {@code a} and its value
    82      * is {@code b=c}.
    84      * is {@code b=c}.
    83      *
    85      *
       
    86      * @param fields the field names
    84      * @throws IllegalArgumentException if the parameter is null, or
    87      * @throws IllegalArgumentException if the parameter is null, or
    85      * if a field name is empty, or if the same field name appears
    88      * if a field name is empty, or if the same field name appears
    86      * more than once, or if one of the strings does not contain
    89      * more than once, or if one of the strings does not contain
    87      * an {@code =} character.
    90      * an {@code =} character.
    88      */
    91      */
    92 
    95 
    93     /**
    96     /**
    94      * <p>Construct a descriptor where the names and values of the fields
    97      * <p>Construct a descriptor where the names and values of the fields
    95      * are the keys and values of the given Map.</p>
    98      * are the keys and values of the given Map.</p>
    96      *
    99      *
       
   100      * @param fields the field names and values
    97      * @throws IllegalArgumentException if the parameter is null, or
   101      * @throws IllegalArgumentException if the parameter is null, or
    98      * if a field name is null or empty, or if the same field name appears
   102      * if a field name is null or empty, or if the same field name appears
    99      * more than once (which can happen because field names are not case
   103      * more than once (which can happen because field names are not case
   100      * sensitive).
   104      * sensitive).
   101      */
   105      */