public boolean match(Sim_event ev)
    {
        if (ev == null) {
            return false;
        }

        boolean result = false;
        try
        {
            // find an event with a matching tag first
            if ( tag_ == ev.get_tag() )
            {
                Object obj = ev.get_data();

                // if the event's data contains the correct data
                if (obj instanceof int[])
                {
                    int[] array = (int[]) obj;

                    // if the data contains the correct ID or value
                    if (array[0] == eventID_) {
                        result = true;
                    }
                }
            }
        }
        catch (Exception e) {
            result = false;
        }

        return result;
    }