<commit_before>/*******************************************************************************
 * Copyright (c) 2010 itemis AG (http://www.itemis.eu) 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
 *******************************************************************************/
package org.eclipse.xtext.nodemodel.util;

import org.eclipse.xtext.nodemodel.BidiIterable;
import org.eclipse.xtext.nodemodel.BidiIterator;

/**
 * @author <NAME> - Initial contribution and API
 */
public class EmptyBidiIterable<T> implements BidiIterable<T> {

	private static EmptyBidiIterable<?> INSTANCE = new EmptyBidiIterable<Object>();
	
	@SuppressWarnings("unchecked")
	public static <T> EmptyBidiIterable<T> instance() {
		return (EmptyBidiIterable<T>) INSTANCE;
	}

	@Override
	public BidiIterator<T> iterator() {
		return EmptyBidiIterator.instance();
	}
	
	@Override
	public BidiIterable<T> reverse() {
		return null;
	}

}<commit_msg>[eclipse/xtext-eclipse#616] Reverse of empty is empty again, not null.<commit_after>/*******************************************************************************
 * Copyright (c) 2010 itemis AG (http://www.itemis.eu) 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
 *******************************************************************************/
package org.eclipse.xtext.nodemodel.util;

import org.eclipse.xtext.nodemodel.BidiIterable;
import org.eclipse.xtext.nodemodel.BidiIterator;

/**
 * @author <NAME> - Initial contribution and API
 */
public class EmptyBidiIterable<T> implements BidiIterable<T> {

	private static EmptyBidiIterable<?> INSTANCE = new EmptyBidiIterable<Object>();
	
	@SuppressWarnings("unchecked")
	public static <T> EmptyBidiIterable<T> instance() {
		return (EmptyBidiIterable<T>) INSTANCE;
	}

	@Override
	public BidiIterator<T> iterator() {
		return EmptyBidiIterator.instance();
	}
	
	@Override
	public BidiIterable<T> reverse() {
		return instance();
	}

}
{'fraction_non_alphanumeric': 0.23195215719777873, 'fraction_numerical': 0.008116189662537377, 'mean_word_length': 5.76878612716763, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6650276', 'n_tokens_mistral': 706, 'n_tokens_neox': 644, 'n_words': 174}