public Alphabet[] getAlphabets() {
    AbstractCollection<Alphabet> alphs = new ArrayList<Alphabet>();

    for (FormalDefinitionComponent comp : this.getComponents()) {
      if (comp instanceof Alphabet) {
        alphs.add((Alphabet) comp);
      }
    }

    return alphs.toArray(new Alphabet[0]);
  }