Plex-FAWE/worldedit-core/src/main/java/com/sk89q/jnbt/NamedData.java
Jesse Boyd a629d15c74
Copy paste/merge FAWE classes to this WorldEdit fork
- so certain people can look at the diff and complain about my sloppy code :(

Signed-off-by: Jesse Boyd <jessepaleg@gmail.com>
2018-08-13 00:03:07 +10:00

42 lines
709 B
Java

package com.sk89q.jnbt;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* Some data with a name
*/
public class NamedData<T> {
private final String name;
private final T data;
/**
* Create a new named tag.
*
* @param name the name
* @param data the data
*/
public NamedData(String name, T data) {
checkNotNull(name);
this.name = name;
this.data = data;
}
/**
* Get the name of the tag.
*
* @return the name
*/
public String getName() {
return name;
}
/**
* Get the tag.
*
* @return the tag
*/
public T getValue() {
return data;
}
}