Package fr.france

Enum Region

java.lang.Object
java.lang.Enum<Region>
fr.france.Region
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Region>, java.lang.constant.Constable

public enum Region
extends java.lang.Enum<Region>
Region est l'énumérateur représentant chacune des régions françaises.

Une Region est caractérisée par les informations suivantes :

  • Un nom de région.
  • Une liste de départements qui lui sont ratachées.

De plus, la class Region possède une méthode rechercherParNom(String) qui permet de retrouver une région en fonction de son nom.

Version:
1.0.1
Author:
MathieuSoysal
See Also:
Departement
  • Enum Constant Details

  • Method Details

    • values

      public static Region[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Region valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null
    • rechercherParNom

      public static Region rechercherParNom​(java.lang.String nom)
      Retourne la Region correspondant au nom donné en paramètre.
      Parameters:
      nom - de la région devant être cherché
      Returns:
      Region correpondant au nom donné, sinon retourne null si aucune région avec ce nom a été trouvé.
      See Also:
      Region
    • getDepartements

      public java.util.List<Departement> getDepartements()
      Returns:
      les départements contenus au sein de la région
      See Also:
      Departement
    • getNom

      public java.lang.String getNom()
      Returns:
      le nom de la région
    • getCaumunes

      public java.util.List<Caumune> getCaumunes()
      Returns:
      Toutes les caumunes de la région
      See Also:
      Caumune