< prev index next >

src/java.base/share/classes/java/text/CollationKey.java

Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
   1 /*
   2  * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 119     public String getSourceString() {
 120         return source;
 121     }
 122 
 123 
 124     /**
 125      * Converts the CollationKey to a sequence of bits. If two CollationKeys
 126      * could be legitimately compared, then one could compare the byte arrays
 127      * for each of those keys to obtain the same result.  Byte arrays are
 128      * organized most significant byte first.
 129      *
 130      * @return a byte array representation of the CollationKey
 131      */
 132     public abstract byte[] toByteArray();
 133 
 134 
 135   /**
 136    * CollationKey constructor.
 137    *
 138    * @param source the source string
 139    * @exception NullPointerException if {@code source} is null
 140    * @since 1.6
 141    */
 142     protected CollationKey(String source) {
 143         if (source==null){
 144             throw new NullPointerException();
 145         }
 146         this.source = source;
 147     }
 148 
 149     private final String source;
 150 }
   1 /*
   2  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 119     public String getSourceString() {
 120         return source;
 121     }
 122 
 123 
 124     /**
 125      * Converts the CollationKey to a sequence of bits. If two CollationKeys
 126      * could be legitimately compared, then one could compare the byte arrays
 127      * for each of those keys to obtain the same result.  Byte arrays are
 128      * organized most significant byte first.
 129      *
 130      * @return a byte array representation of the CollationKey
 131      */
 132     public abstract byte[] toByteArray();
 133 
 134 
 135   /**
 136    * CollationKey constructor.
 137    *
 138    * @param source the source string
 139    * @throws    NullPointerException if {@code source} is null
 140    * @since 1.6
 141    */
 142     protected CollationKey(String source) {
 143         if (source==null){
 144             throw new NullPointerException();
 145         }
 146         this.source = source;
 147     }
 148 
 149     private final String source;
 150 }
< prev index next >