<commit_before>/*******************************************************************************
 * Copyright (c) 2009 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.util;

/**
 * @author <NAME> - Initial contribution and API
 */
public class Wrapper<T> {
	
	private T value;
	
	public static <T> Wrapper<T> wrap(T value) {
		return new Wrapper<T>(value);
	}
	
	public static <T> Wrapper<T> forType(Class<T> type) {
		return new Wrapper<T>();
	}
	
	public Wrapper() {
		this(null);
	}
	
	public Wrapper(T value) {
		this.value = value;
	}
	
	public T get() {
		return value;
	}
	
	public void set(T value) {
		this.value = value;
	}
	
	@Override
	public String toString() {
		return "Wrapper of ("+value+")";
	}

}
<commit_msg>[web] General cleanup, testing, and bugfixing<commit_after>/*******************************************************************************
 * Copyright (c) 2009 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.util;

/**
 * @author <NAME> - Initial contribution and API
 */
public class Wrapper<T> {
	
	private T value;
	
	public static <T> Wrapper<T> wrap(T value) {
		return new Wrapper<T>(value);
	}
	
	public static <T> Wrapper<T> forType(Class<T> type) {
		return new Wrapper<T>();
	}
	
	public Wrapper() {
		this(null);
	}
	
	public Wrapper(T value) {
		this.value = value;
	}
	
	public T get() {
		return value;
	}
	
	public void set(T value) {
		this.value = value;
	}
	
	/**
	 * @since 2.9
	 */
	public boolean isEmpty() {
		return value == null;
	}
	
	@Override
	public String toString() {
		return "Wrapper of ("+value+")";
	}

}

{'fraction_non_alphanumeric': 0.25242290748898677, 'fraction_numerical': 0.007929515418502203, 'mean_word_length': 4.069196428571429, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '2562529', 'n_tokens_mistral': 740, 'n_tokens_neox': 660, 'n_words': 209}