Package java.util

Examples of java.util.ResourceBundle.keySet()


        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            frameworkProps.put(key, props.getString(key));

            if (key.equals(CONFIG_ERRAI_SERIALIZABLE_TYPE)) {
View Full Code Here


        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            frameworkProps.put(key, props.getString(key));

            if (key.equals(CONFIG_ERRAI_SERIALIZABLE_TYPE)) {
View Full Code Here

        inputStream = url.openStream();

        final ResourceBundle props = new PropertyResourceBundle(inputStream);
        if (props != null) {

          for (final Object o : props.keySet()) {
            final String key = (String) o;

            frameworkProps.put(key, props.getString(key));

            if (key.equals(CONFIG_ERRAI_SERIALIZABLE_TYPE)) {
View Full Code Here

            @HandlerOutput(name="result", type=Map.class)
    })
    public static void getFieldLengths(HandlerContext handlerCtx) {
        ResourceBundle bundle = (ResourceBundle) handlerCtx.getInputValue("bundle");
        Map<String, Integer> result = new HashMap<String, Integer>();
        for (String key : bundle.keySet()) {
            try {
                result.put(key, Integer.decode(bundle.getString(key)));
            } catch (NumberFormatException ex) {
                // Log warning about expecting a number...
                // This should never happen; if it does it's a bug, so no need to localize.
View Full Code Here

            @HandlerOutput(name="result", type=Map.class)
    })
    public static void getFieldLengths(HandlerContext handlerCtx) {
        ResourceBundle bundle = (ResourceBundle) handlerCtx.getInputValue("bundle");
        Map<String, Integer> result = new HashMap<String, Integer>();
        for (String key : bundle.keySet()) {
            try {
                result.put(key, Integer.decode(bundle.getString(key)));
            } catch (NumberFormatException ex) {
                // Log warning about expecting a number...
                // This should never happen; if it does it's a bug, so no need to localize.
View Full Code Here

   * Creates the factory.
   */
  private BusinessDayConventionFactory() {
    final ResourceBundle conventions = ResourceBundle.getBundle(BusinessDayConvention.class.getName());
    final Map<String, BusinessDayConvention> instances = new HashMap<>();
    for (final String convention : conventions.keySet()) {
      final String clazz = conventions.getString(convention);
      BusinessDayConvention instance = instances.get(clazz);
      if (instance == null) {
        try {
          instance = (BusinessDayConvention) Class.forName(clazz).newInstance();
View Full Code Here

    loadCountryDefinitions();
  }

  private void loadCalendarInstances() {
    final ResourceBundle calendars = ResourceBundle.getBundle(Calendar.class.getName());
    for (final String calendarName : calendars.keySet()) {
      try {
        String uri = null;
        String clazzName = calendars.getString(calendarName);
        if (clazzName.indexOf(':') > 0) {
          uri = clazzName.substring(clazzName.indexOf(':') + 1);
View Full Code Here

    }
  }

  private void loadCountryDefinitions() {
    final ResourceBundle countries = ResourceBundle.getBundle("com.opengamma.financial.convention.calendar.Country");
    for (final String countryCode : countries.keySet()) {
      final String calendarName = countries.getString(countryCode);
      final Calendar calendar = getCalendar(calendarName);
      if (calendar == null) {
        throw new OpenGammaRuntimeException("Cannot find calendar '" + calendarName + "' for country '" + countryCode + "'");
      }
View Full Code Here

   * Creates the factory
   */
  private DayCountFactory() {
    final ResourceBundle conventions = ResourceBundle.getBundle(DayCount.class.getName());
    final Map<String, DayCount> instances = new HashMap<>();
    for (final String convention : conventions.keySet()) {
      final String clazz = conventions.getString(convention);
      DayCount instance = instances.get(clazz);
      if (instance == null) {
        try {
          instance = (DayCount) Class.forName(clazz).newInstance();
View Full Code Here

     */
    @Override
    public void init() {
        String resource = "org.openscience.jchempaint.resources.features";
        ResourceBundle featuresDefinition = ResourceBundle.getBundle(resource, Locale.getDefault());
        Iterator<String> featuresit = featuresDefinition.keySet().iterator();
        while(featuresit.hasNext()){
          String feature = featuresit.next();
          if (getParameter(feature) != null
                    && getParameter(feature).equals("off")) {
            blacklist.add(feature);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.