org.apache.lucene.analysis.util.CharArraySet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aem-sdk-api Show documentation
Show all versions of aem-sdk-api Show documentation
The Adobe Experience Manager SDK
package org.apache.lucene.analysis.util;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.util.AbstractSet;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import org.apache.lucene.util.Version;
/**
* A simple class that stores Strings as char[]'s in a
* hash table. Note that this is not a general purpose
* class. For example, it cannot remove items from the
* set, nor does it resize its hash table to be smaller,
* etc. It is designed to be quick to test if a char[]
* is in the set without the necessity of converting it
* to a String first.
*
*
* You must specify the required {@link Version}
* compatibility when creating {@link CharArraySet}:
*
* - As of 3.1, supplementary characters are
* properly lowercased.
*
* Before 3.1 supplementary characters could not be
* lowercased correctly due to the lack of Unicode 4
* support in JDK 1.4. To use instances of
* {@link CharArraySet} with the behavior before Lucene
* 3.1 pass a {@link Version} < 3.1 to the constructors.
*
* Please note: This class implements {@link java.util.Set Set} but
* does not behave like it should in all cases. The generic type is
* {@code Set
© 2015 - 2024 Weber Informatics LLC | Privacy Policy