|
7 | 7 | import java.time.Instant; |
8 | 8 | import java.util.List; |
9 | 9 | import java.util.Map; |
| 10 | +import java.util.Optional; |
10 | 11 |
|
11 | 12 |
|
12 | 13 | /** |
@@ -138,6 +139,34 @@ public interface AsdfNode extends Iterable<AsdfNode> { |
138 | 139 | */ |
139 | 140 | AsdfNode get(AsdfNode key); |
140 | 141 |
|
| 142 | + /** |
| 143 | + * Get an optional mapping value as AsdfNode, indexed by String key. |
| 144 | + * @param key mapping key |
| 145 | + * @return value |
| 146 | + */ |
| 147 | + Optional<AsdfNode> getOptional(String key); |
| 148 | + |
| 149 | + /** |
| 150 | + * Get an optional sequence value or mapping value as AsdfNode, indexed by long key. |
| 151 | + * @param key sequence index or mapping key |
| 152 | + * @return value |
| 153 | + */ |
| 154 | + Optional<AsdfNode> getOptional(long key); |
| 155 | + |
| 156 | + /** |
| 157 | + * Get an optional mapping value as AsdfNode, indexed by boolean key. |
| 158 | + * @param key mapping key |
| 159 | + * @return value |
| 160 | + */ |
| 161 | + Optional<AsdfNode> getOptional(boolean key); |
| 162 | + |
| 163 | + /** |
| 164 | + * Get an optional mapping value as AsdfNode, indexed by AsdfNode key. |
| 165 | + * @param key mapping key |
| 166 | + * @return value |
| 167 | + */ |
| 168 | + Optional<AsdfNode> getOptional(AsdfNode key); |
| 169 | + |
141 | 170 | /** |
142 | 171 | * Get a NUMBER mapping value as BigDecimal, indexed by String key. |
143 | 172 | * @param key mapping key |
@@ -166,6 +195,34 @@ public interface AsdfNode extends Iterable<AsdfNode> { |
166 | 195 | */ |
167 | 196 | BigDecimal getBigDecimal(AsdfNode key); |
168 | 197 |
|
| 198 | + /** |
| 199 | + * Get a NUMBER mapping value as BigDecimal, indexed by String key. |
| 200 | + * @param key mapping key |
| 201 | + * @return value |
| 202 | + */ |
| 203 | + Optional<BigDecimal> getBigDecimalOptional(String key); |
| 204 | + |
| 205 | + /** |
| 206 | + * Get a NUMBER sequence value or mapping value as BigDecimal, indexed by long key. |
| 207 | + * @param key sequence index or mapping key |
| 208 | + * @return value |
| 209 | + */ |
| 210 | + Optional<BigDecimal> getBigDecimalOptional(long key); |
| 211 | + |
| 212 | + /** |
| 213 | + * Get a NUMBER mapping value as BigDecimal, indexed by boolean key. |
| 214 | + * @param key mapping key |
| 215 | + * @return value |
| 216 | + */ |
| 217 | + Optional<BigDecimal> getBigDecimalOptional(boolean key); |
| 218 | + |
| 219 | + /** |
| 220 | + * Get a NUMBER sequence value or mapping value as BigDecimal, indexed by AsdfNode key. |
| 221 | + * @param key mapping key |
| 222 | + * @return value |
| 223 | + */ |
| 224 | + Optional<BigDecimal> getBigDecimalOptional(AsdfNode key); |
| 225 | + |
169 | 226 | /** |
170 | 227 | * Get a NUMBER mapping value as BigInteger, indexed by String key. |
171 | 228 | * @param key mapping key |
|
0 commit comments