|
What this is
Other links
The source code/*******************************************************************************
* Copyright (c) 2004, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
*******************************************************************************/
package org.eclipse.core.internal.utils;
import java.util.HashMap;
/**
* A string pool is used for sharing strings in a way that eliminates duplicate
* equal strings. A string pool instance can be maintained over a long period
* of time, or used as a temporary structure during a string sharing pass over
* a data structure.
* <p>
* This class is not intended to be subclassed by clients.
* </p>
*
* @see IStringPoolParticipant
* @since 3.1
*/
public final class StringPool {
private int savings;
private final HashMap map = new HashMap();
/**
* Creates a new string pool.
*/
public StringPool() {
super();
}
/**
* Adds a <code>String to the pool. Returns a
|
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.