code: public String getResourceType() {
          if (!tokens.isEmpty() && tokens.getLast().hasKey()) {
              return tokens.getLast().getKey();
          }
          return null;
      }
docs: Returns the resource type of the last segment for this address template
  
  @return the resource type