Demo entry 6364072

Event

   

Submitted by hunao on May 15, 2017 at 12:28
Language: Java. Code size: 512 Bytes.

public class Event<T> {
    private String code;
    private T data;

    public Event(String code) {
        this.code = code;
    }

    public Event(String code, T data) {
        this.code = code;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).