blob: 0ce4db221038063237f4999a1e660193ac950aae [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011 Frank Appel 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:
* Frank Appel - initial API and implementation
******************************************************************************/
package org.eclipse.rap.rwt.osgi.internal;
import java.util.HashSet;
class ApplicationReferencesContainer {
private final HashSet<ApplicationReferenceImpl> applicationReferences;
ApplicationReferencesContainer() {
applicationReferences = new HashSet<ApplicationReferenceImpl>();
}
void add( ApplicationReferenceImpl applicationReference ) {
applicationReferences.add( applicationReference );
}
void remove( ApplicationReferenceImpl applicationReference ) {
applicationReferences.remove( applicationReference );
}
void clear() {
applicationReferences.clear();
}
ApplicationReferenceImpl[] getAll() {
int size = applicationReferences.size();
ApplicationReferenceImpl[] result = new ApplicationReferenceImpl[ size ];
return applicationReferences.toArray( result );
}
}