private static bool isElementOfGoal(Chave chave = null, Disjuntor disjuntor = null)
    {
        if (chave == null && disjuntor == null)
        {
            return(false);
        }
        else
        {
            Chave[]     chavesList      = Stage1dController.returnChavesObjective();
            Disjuntor[] disjuntoresList = Stage1dController.returnDisjuntoresObjective();

            bool result = true;
            if (chave != null)
            {
                foreach (Chave c in chavesList)
                {
                    result = (chave.getCodigo() == c.getCodigo()) ? true : false;
                    if (result)
                    {
                        break;
                    }
                }
            }
            else if (disjuntor != null)
            {
                foreach (Disjuntor d in disjuntoresList)
                {
                    result = (disjuntor.getCodigo() == d.getCodigo()) ? true : false;
                    if (result)
                    {
                        break;
                    }
                }
            }
            return(result);
        }
    }