Java Code Examples for com.facebook.react.common.MapBuilder#Builder

The following examples show how to use com.facebook.react.common.MapBuilder#Builder . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
@Override
@Nullable
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    String[] events = {
        EVENT_SIZE_CHANGE,
        EVENT_AD_LOADED,
        EVENT_AD_FAILED_TO_LOAD,
        EVENT_AD_OPENED,
        EVENT_AD_CLOSED,
        EVENT_AD_LEFT_APPLICATION,
        EVENT_APP_EVENT
    };
    for (int i = 0; i < events.length; i++) {
        builder.put(events[i], MapBuilder.of("registrationName", events[i]));
    }
    return builder.build();
}
 
Example 2
@Override
@Nullable
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    String[] events = {
        EVENT_SIZE_CHANGE,
        EVENT_AD_LOADED,
        EVENT_AD_FAILED_TO_LOAD,
        EVENT_AD_OPENED,
        EVENT_AD_CLOSED,
        EVENT_AD_LEFT_APPLICATION
    };
    for (int i = 0; i < events.length; i++) {
        builder.put(events[i], MapBuilder.of("registrationName", events[i]));
    }
    return builder.build();
}
 
Example 3
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (RNRtmpView.Events event : RNRtmpView.Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 4
@Override
public Map<String,Integer> getCommandsMap() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (RNRtmpView.Commands command : RNRtmpView.Commands.values()) {
        builder.put(command.toString(), command.ordinal());
    }
    return builder.build();
}
 
Example 5
@Override
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 6
@Override
@Nullable
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
  MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
  return builder
          .put("onLoadModelSuccess", MapBuilder.of("registrationName", "onLoadModelSuccess"))
          .put("onLoadModelError", MapBuilder.of("registrationName", "onLoadModelError"))
          .put("onAnimationStart", MapBuilder.of("registrationName", "onAnimationStart"))
          .put("onAnimationStop", MapBuilder.of("registrationName", "onAnimationStop"))
          .put("onAnimationUpdate", MapBuilder.of("registrationName", "onAnimationUpdate"))
          .build();
}
 
Example 7
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 8
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 9
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 10
@Nullable
@Override
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (VLCPlayerView.Events event : VLCPlayerView.Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 11
Source Project: react-native-tapjoy   File: TapjoyModule.java    License: MIT License 5 votes vote down vote up
@Nullable
@Override
public Map<String, Object> getConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    List<String> events = new ArrayList<>();

    for (Object event : Events.values()) {
        events.add(event.toString());
    }

    builder.put("events", events);
    return builder.build();
}
 
Example 12
@Nullable
@Override
public Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    builder.put(RNYandexMapKitView.MAP_EVENT,       MapBuilder.of("registrationName", RNYandexMapKitView.MAP_EVENT));
    builder.put(RNYandexMapKitView.GEOCODING_EVENT, MapBuilder.of("registrationName", RNYandexMapKitView.GEOCODING_EVENT));
    return builder.build();
}
 
Example 13
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 14
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 15
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}
 
Example 16
Source Project: react-native-intl   File: ReactNativeIntl.java    License: MIT License 5 votes vote down vote up
@Override
public Map<String, Object> getConstants() {
	MapBuilder.Builder<String, Object> builder = MapBuilder.builder();

	builder.put("systemLocale", getSystemLocale());
	builder.put("languages", getAvailableLocales());
	builder.put("availableLocales", getAvailableLocales());
	builder.put("availableCalendars", "");

	return builder.build();
}
 
Example 17
@Override
public @Nullable Map<String, Object> getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder<String, Object> builder = MapBuilder.builder();
    for (String event : VideoEventEmitter.Events) {
        builder.put(event, MapBuilder.of("registrationName", event));
    }
    return builder.build();
}
 
Example 18
@Override
@Nullable
public Map getExportedCustomDirectEventTypeConstants() {
    MapBuilder.Builder builder = MapBuilder.builder();
    for (Events event : Events.values()) {
        builder.put(event.toString(), MapBuilder.of("registrationName", event.toString()));
    }
    return builder.build();
}