553N/A * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 553N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 553N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 553N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 553N/A * or visit www.oracle.com if you need additional information or have any 0N/A * An immutable sequence of characters. When created by the same 0N/A * implementation, objects implementing this interface must obey the 0N/A * general {@linkplain Object#equals equals contract} when compared 0N/A * with each other. Therefore, {@code Name} objects from the same 0N/A * implementation are usable in collections while {@code Name}s from 0N/A * different implementations may not work properly in collections. 0N/A * <p>An empty {@code Name} has a length of zero. 0N/A * <p>In the context of {@linkplain 0N/A * javax.annotation.processing.ProcessingEnvironment annotation 0N/A * processing}, the guarantees for "the same" implementation must 0N/A * include contexts where the {@linkplain javax.annotation.processing 0N/A * API mediated} side effects of {@linkplain 0N/A * javax.annotation.processing.Processor processors} could be visible 0N/A * to each other, including successive annotation processing 0N/A * {@linkplain javax.annotation.processing.RoundEnvironment rounds}. 0N/A * @author Joseph D. Darcy 0N/A * @author Scott Seligman 0N/A * @author Peter von der Ahé 0N/A * @see javax.lang.model.util.Elements#getName 0N/A * Returns {@code true} if the argument represents the same 0N/A * name as {@code this}, and {@code false} otherwise. 0N/A * <p>Note that the identity of a {@code Name} is a function both 0N/A * of its content in terms of a sequence of characters as well as 0N/A * the implementation which created it. 0N/A * @param obj the object to be compared with this element 0N/A * @return {@code true} if the specified object represents the same 0N/A * @see Element#equals 0N/A * Obeys the general contract of {@link Object#hashCode Object.hashCode}. 0N/A * Compares this name to the specified {@code CharSequence}. The result 0N/A * is {@code true} if and only if this name represents the same sequence 0N/A * of {@code char} values as the specified sequence. 0N/A * @return {@code true} if this name represents the same sequence 0N/A * of {@code char} values as the specified sequence, {@code false} 0N/A * @param cs The sequence to compare this name against 0N/A * @see String#contentEquals(CharSequence)