mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-07-08 01:40:03 +00:00
a629d15c74
- so certain people can look at the diff and complain about my sloppy code :( Signed-off-by: Jesse Boyd <jessepaleg@gmail.com>
42 lines
709 B
Java
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;
|
|
}
|
|
}
|