com.force.i18n.commons.text.GenericUniquefy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of grammaticus Show documentation
Show all versions of grammaticus Show documentation
Localization Framework that allows grammatically correct renaming of nouns
/*
* Copyright (c) 2017, salesforce.com, inc.
* All rights reserved.
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
package com.force.i18n.commons.text;
import java.util.HashMap;
import java.util.Map;
import com.google.common.annotations.Beta;
/**
* A version of uniquefy that is generic any object.
*
* The purpose is if you are java serializing an object, removing duplicates
* if they represent the same thing will reduce the output size.
*
* Beta class. Classes under com.force.i18n.commons package will be moved into a dedicated project.
*
* @author stamm
*/
@Beta
public class GenericUniquefy {
// Limit the size of the stringPool to prevent OOM
private static final int MAX_POOL_SIZE = 10000;
/** a Uniquefy that doesn't do anything; useful to avoid if (uniquefy != null) checks in code */
private static final GenericUniquefy
© 2015 - 2024 Weber Informatics LLC | Privacy Policy