code: @Nonnull
      public static List<Mapcode> encode(final double latDeg, final double lonDeg,
                                         @Nullable final Territory restrictToTerritory)
              throws IllegalArgumentException {
          final List<Mapcode> results = Encoder.encode(latDeg, lonDeg, restrictToTerritory, false);
          assert results != null;
          return results;
      }
docs: Encode a lat/lon pair to a mapcode with territory information, for a specific territory. This produces a
  potentially empty list of mapcodes (empty if the lat/lon does not fall within the territory for mapcodes).
  
  The returned result list will always contain at least 1 mapcode, because every lat/lon pair can be encoded.
  
  The list is ordered in such a way that the last result is the international code. However, you cannot assume
  that the first result is the shortest mapcode. If you want to use the shortest mapcode, use
  {@link #encodeToShortest(double, double, Territory)}.
  
  @param latDeg              Latitude, accepted range: -90..90 (limited to this range if outside).
  @param lonDeg              Longitude, accepted range: -180..180 (wrapped to this range if outside).
  @param restrictToTerritory Try to encode only within this territory, see {@link Territory}. May be null.
  @return List of mapcode information records, see {@link Mapcode}. This list is empty if no
  Mapcode can be generated for this territory matching the lat/lon.
  @throws IllegalArgumentException Thrown if latitude or longitude are out of range.