Lines Matching defs:is

5  * This code is free software; you can redistribute it and/or modify it
11 * This code is distributed in the hope that it will be useful, but WITHOUT
14 * version 2 for more details (a copy is included in the LICENSE file that
48 * preference and configuration data. This data is stored
66 * tree has a <i>node name</i> (which is not necessarily unique),
71 * node has an arbitrary node name, specified at the time it is created. The
82 * is simply the string that must be appended to <i>a</i>'s absolute path name
87 * <li>Every node's path name relative to itself is the empty string.
88 * <li>Every node's path name relative to its parent is its node name (except
90 * <li>Every node's path name relative to the root is its absolute path name
99 * <li>Any string that conforms to these two rules is a valid path name.
108 * <tt>flush</tt> invocation is <i>not</i> required upon termination to ensure
112 * object require the invoker to provide a default value. The default value is
113 * returned if no value has been previously set <i>or if the backing store is
114 * unavailable</i>. The intent is to allow applications to operate, albeit
117 * prevent them from operating if the backing store is unavailable. Ordinary
124 * results will be equivalent to some serial execution. If this class is used
140 * Note that the system URI (http://java.sun.com/dtd/preferences.dtd) is
142 * serves as a string to uniquely identify the DTD, which is:
148 * &lt;!-- The preferences element is at the root of an XML document
176 * &lt;!-- An entry represents a single preference, which is simply
187 * is used to generate the root preferences nodes. This allows the
192 * implementation is located as follows:
197 * <tt>java.util.prefs.PreferencesFactory</tt> is defined, then it is
199 * <tt>PreferencesFactory</tt> interface. The class is loaded and
200 * instantiated; if this process fails then an unspecified error is
204 * has been installed in a jar file that is visible to the
209 * specified in that file is taken. If more than one such jar file is
210 * provided, the first one found will be used. The class is loaded
212 * is thrown. </p></li>
215 * an extension jar file is provided, then the system-wide default
217 * platform is loaded and instantiated.</p></li>
332 * that is associated (by convention) with the specified class's package.
333 * The convention is as follows: the absolute path name of the node is the
337 * <tt>com.acme.widget.Foo</tt> is <tt>/com/acme/widget</tt>.
340 * associated preference node is <tt>&lt;unnamed&gt;</tt>. This node
341 * is not intended for long term use, but for convenience in the early
344 * at this node as it is shared by all programs that use it.</i>
352 * (If the class name is misspelled, it will typically result in a
359 * the <tt>flush</tt> method is called on the returned node (or one of its
362 * @param c the class for whose package a user preference node is desired.
364 * <tt>c</tt> is a member.
365 * @throws NullPointerException if <tt>c</tt> is <tt>null</tt>.
366 * @throws SecurityException if a security manager is present and
375 * Returns the preference node from the system preference tree that is
377 * convention is as follows: the absolute path name of the node is the
381 * <tt>com.acme.widget.Foo</tt> is <tt>/com/acme/widget</tt>.
384 * associated preference node is <tt>&lt;unnamed&gt;</tt>. This node
385 * is not intended for long term use, but for convenience in the early
388 * at this node as it is shared by all programs that use it.</i>
396 * (If the class name is misspelled, it will typically result in a
403 * the <tt>flush</tt> method is called on the returned node (or one of its
406 * @param c the class for whose package a system preference node is desired.
408 * <tt>c</tt> is a member.
409 * @throws NullPointerException if <tt>c</tt> is <tt>null</tt>.
410 * @throws SecurityException if a security manager is present and
448 * @throws SecurityException If a security manager is present and
464 * @throws SecurityException If a security manager is present and
487 * @param key key with which the specified value is to be associated.
489 * @throws NullPointerException if key or value is <tt>null</tt>.
500 * node. Returns the specified default if there is no value associated
501 * with the key, or the backing store is inaccessible.
504 * stores. If there is no value associated with the specified key
505 * but there is such a <i>stored default</i>, it is returned in
508 * @param key key whose associated value is to be returned.
512 * if no value is associated with <tt>key</tt>, or the backing
513 * store is inaccessible.
516 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>. (A
517 * <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
525 * <p>If this implementation supports <i>stored defaults</i>, and there is
530 * @param key key whose mapping is to be removed from the preference node.
531 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
558 * specified key in this preference node. The associated string is the
560 * {@link Integer#toString(int)}. This method is intended for use in
563 * @param key key with which the string form of value is to be associated.
564 * @param value value whose string form is to be associated with key.
565 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
576 * specified key in this preference node. The string is converted to
578 * specified default if there is no value associated with the key,
579 * the backing store is inaccessible, or if
582 * method is intended for use in conjunction with {@link #putInt}.
585 * default exists, is accessible, and could be converted to an int
586 * with <tt>Integer.parseInt</tt>, this int is returned in preference to
589 * @param key key whose associated value is to be returned as an int.
593 * or the backing store is inaccessible.
600 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
608 * specified key in this preference node. The associated string is the
610 * {@link Long#toString(long)}. This method is intended for use in
613 * @param key key with which the string form of value is to be associated.
614 * @param value value whose string form is to be associated with key.
615 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
626 * specified key in this preference node. The string is converted to
628 * specified default if there is no value associated with the key,
629 * the backing store is inaccessible, or if
632 * method is intended for use in conjunction with {@link #putLong}.
635 * default exists, is accessible, and could be converted to a long
636 * with <tt>Long.parseLong</tt>, this long is returned in preference to
639 * @param key key whose associated value is to be returned as a long.
643 * or the backing store is inaccessible.
650 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
658 * specified key in this preference node. The associated string is
659 * <tt>"true"</tt> if the value is true, and <tt>"false"</tt> if it is
660 * false. This method is intended for use in conjunction with
663 * @param key key with which the string form of value is to be associated.
664 * @param value value whose string form is to be associated with key.
665 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
679 * represents false. Case is ignored, so, for example, <tt>"TRUE"</tt>
680 * and <tt>"False"</tt> are also valid. This method is intended for use in
683 * <p>Returns the specified default if there is no value
684 * associated with the key, the backing store is inaccessible, or if the
685 * associated value is something other than <tt>"true"</tt> or
689 * default exists and is accessible, it is used in preference to the
690 * specified default, unless the stored default is something other than
692 * specified default is used.
694 * @param key key whose associated value is to be returned as a boolean.
698 * or the backing store is inaccessible.
705 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
713 * specified key in this preference node. The associated string is the
715 * {@link Float#toString(float)}. This method is intended for use in
718 * @param key key with which the string form of value is to be associated.
719 * @param value value whose string form is to be associated with key.
720 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
731 * specified key in this preference node. The string is converted to an
733 * default if there is no value associated with the key, the backing store
734 * is inaccessible, or if <tt>Float.parseFloat(String)</tt> would throw a
736 * This method is intended for use in conjunction with {@link #putFloat}.
739 * default exists, is accessible, and could be converted to a float
740 * with <tt>Float.parseFloat</tt>, this float is returned in preference to
743 * @param key key whose associated value is to be returned as a float.
747 * or the backing store is inaccessible.
754 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
762 * specified key in this preference node. The associated string is the
764 * {@link Double#toString(double)}. This method is intended for use in
767 * @param key key with which the string form of value is to be associated.
768 * @param value value whose string form is to be associated with key.
769 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
780 * specified key in this preference node. The string is converted to an
782 * default if there is no value associated with the key, the backing store
783 * is inaccessible, or if <tt>Double.parseDouble(String)</tt> would throw a
785 * This method is intended for use in conjunction with {@link #putDouble}.
788 * default exists, is accessible, and could be converted to a double
789 * with <tt>Double.parseDouble</tt>, this double is returned in preference
792 * @param key key whose associated value is to be returned as a double.
796 * or the backing store is inaccessible.
803 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>.
811 * specified key in this preference node. The associated string is
816 * characters. Note that the maximum length of the byte array is limited
819 * This method is intended for use in conjunction with
822 * @param key key with which the string form of value is to be associated.
823 * @param value value whose string form is to be associated with key.
824 * @throws NullPointerException if key or value is <tt>null</tt>.
841 * extraneous characters are permitted. This method is intended for use
844 * <p>Returns the specified default if there is no value
845 * associated with the key, the backing store is inaccessible, or if the
846 * associated value is not a valid Base64 encoded byte array
850 * default exists and is accessible, it is used in preference to the
851 * specified default, unless the stored default is not a valid Base64
853 * specified default is used.
855 * @param key key whose associated value is to be returned as a byte array.
859 * or the backing store is inaccessible.
866 * @throws NullPointerException if <tt>key</tt> is <tt>null</tt>. (A
867 * <tt>null</tt> value for <tt>def</tt> <i>is</i> permitted.)
908 * Returns the parent of this preference node, or <tt>null</tt> if this is
926 * to become permanent until the <tt>flush</tt> method is called on
931 * @throws IllegalArgumentException if the path name is invalid (i.e.,
933 * with a slash character and is more than one character long).
934 * @throws NullPointerException if path name is <tt>null</tt>.
948 * {@link #removeNode()} method, it <i>is</i> legal to invoke this method,
954 * is to be checked.
959 * @throws IllegalArgumentException if the path name is invalid (i.e.,
961 * with a slash character and is more than one character long).
962 * @throws NullPointerException if path name is <tt>null</tt>.
965 * <tt>pathName</tt> is not the empty string (<tt>""</tt>).
981 * <p>The removal is not guaranteed to be persistent until the
982 * <tt>flush</tt> method is called on this node (or an ancestor).
996 * @throws UnsupportedOperationException if this method is invoked on
1017 * Returns <tt>true</tt> if this preference node is in the user
1020 * @return <tt>true</tt> if this preference node is in the user
1036 * successfully, it is safe to assume that all changes made in the
1043 * <p>When a flush occurs on a newly created node, it is made persistent,
1048 * <p> If this method is invoked on a node that has been removed with
1049 * the {@link #removeNode()} method, flushSpi() is invoked on this node,
1078 * events</i> for this preference node. A preference change event is
1079 * generated when a preference is added to this node, removed from this
1080 * node, or when the value associated with a preference is changed.
1094 * @throws NullPointerException if <tt>pcl</tt> is null.
1119 * for this node. A node change event is generated when a child node is
1134 * store prior to access (for example, because the backing store is
1135 * unreachable or cached information is out of date). Under these
1140 * @throws NullPointerException if <tt>ncl</tt> is null.
1164 * This XML document is, in effect, an offline backup of the node.
1172 * <p>This method is an exception to the general rule that the results of
1194 * in this node and all of its descendants. This XML document is, in
1203 * <p>This method is an exception to the general rule that the results of
1237 * (This method is designed for use in conjunction with
1241 * <p>This method is an exception to the general rule that the results of
1247 * @param is the input stream from which to read the XML document.
1252 * @throws SecurityException If a security manager is present and
1256 public static void importPreferences(InputStream is)
1259 XmlSupport.importPreferences(is);