package com.bcxin.identify.components.ringbuffers.events;

import lombok.Data;

@Data
public class ObjectEvent<T> extends RingBufferEventAbstract {
    private T data;

    @Override
    public void clear() {
        this.setData(null);
    }

    public static <T> ObjectEvent<T> create(T data) {
        ObjectEvent event = new ObjectEvent();
        event.setData(data);

        return event;
    }
}
