/*
 * Created on 19.10.2004
 */

package de.renew.engine.events;

import de.renew.net.PlaceInstance;


/**
 * Tests if a given token is in a given {@link PlaceInstance}.
 *
 * @author Sven Offermann
 */
public class QuicklyTesting extends PlaceEvent {
    private final Object _token;

    /**
     * Initializes a {@link PlaceEvent} for a given {@link PlaceInstance}
     * and sets the token value for a given token.
     *
     * @param token the given value for the token
     * @param placeInstance the given {@link PlaceInstance} for the initialization of the {@link PlaceEvent}
     */
    public QuicklyTesting(Object token, PlaceInstance placeInstance) {
        super(placeInstance);

        _token = token;
    }

    @Override
    public String toString() {
        return "Quickly Testing " + _token + " in " + getPlaceInstance();
    }

    /**
     * Returns the token that is quickly tested in the place.
     *
     * @return the token
     */
    public Object getToken() {
        return _token;
    }
}