org.eclipse.microprofile.graphql.tck.apps.superhero.db

## Class HeroDatabase

- java.lang.Object
- - org.eclipse.microprofile.graphql.tck.apps.superhero.db.HeroDatabase

    @ApplicationScoped
    public class HeroDatabase
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`HeroDatabase()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addHero(SuperHero hero)`
`int` `addHeroes(Collection<SuperHero> heroes)`
`Team` `createNewTeam(String teamName, SuperHero... initialMembers)`
`Collection<SuperHero>` `getAllHeroes()`
`Collection<Team>` `getAllTeams()`
`SuperHero` `getHero(String name)`
`Team` `getTeam(String name)`
`SuperHero` `removeHero(String heroName)`
`Team` `removeHeroesFromTeam(Team team, Collection<SuperHero> heroes)`
`Team` `removeHeroesFromTeam(Team team, SuperHero... heroes)`
`Team` `removeTeam(String teamName)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HeroDatabase

    public HeroDatabase()

### Method Detail

#### getHero

    public SuperHero getHero(String name)
                      throws UnknownHeroException

Throws:
  `UnknownHeroException`

#### getTeam

    public Team getTeam(String name)
                 throws UnknownTeamException

Throws:
  `UnknownTeamException`

#### getAllHeroes

    public Collection<SuperHero> getAllHeroes()

#### getAllTeams

    public Collection<Team> getAllTeams()

#### addHeroes

    public int addHeroes(Collection<SuperHero> heroes)

#### addHero

    public void addHero(SuperHero hero)
                 throws DuplicateSuperHeroException

Throws:
  `DuplicateSuperHeroException`

#### removeHero

    public SuperHero removeHero(String heroName)

#### createNewTeam

    public Team createNewTeam(String teamName,
                              SuperHero... initialMembers)

#### removeHeroesFromTeam

    public Team removeHeroesFromTeam(Team team,
                                     SuperHero... heroes)

#### removeHeroesFromTeam

    public Team removeHeroesFromTeam(Team team,
                                     Collection<SuperHero> heroes)

#### removeTeam

    public Team removeTeam(String teamName)
                    throws UnknownTeamException

Throws:
  `UnknownTeamException`