Same as #objectKeys but for values — transpile of `Object.values(x)`.
(Object target)
| 963 | |
| 964 | /** Same as {@link #objectKeys} but for values — transpile of `Object.values(x)`. */ |
| 965 | public static List<Object> objectValues(Object target) { |
| 966 | if (target instanceof Map<?, ?> m) { |
| 967 | synchronized (m) { |
| 968 | return new ArrayList<>(m.values()); |
| 969 | } |
| 970 | } |
| 971 | return new ArrayList<>(); |
| 972 | } |
| 973 | |
| 974 | @SuppressWarnings("unchecked") |
| 975 | public static void addElementToObject(Object target, Object... args) { |