All Downloads are FREE. Search and download functionalities are using the official Maven repository.

fr.vergne.translation.impl.EmptyMap Maven / Gradle / Ivy

The newest version!
package fr.vergne.translation.impl;

import java.util.Collections;
import java.util.Iterator;

import fr.vergne.translation.TranslationEntry;
import fr.vergne.translation.TranslationMap;

public class EmptyMap> implements
		TranslationMap {

	@Override
	public Iterator iterator() {
		return Collections. emptyList().iterator();
	}

	@Override
	public Entry getEntry(int index) {
		throw new RuntimeException(
				"This map is empty, no entry should be requested.");
	}

	@Override
	public int size() {
		return 0;
	}

	@Override
	public void saveAll() {
		// nothing to save
	}

	@Override
	public void resetAll() {
		// nothing to reset
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy