check(list.get(m - 2)
时间: 2024-03-14 12:49:26 浏览: 14
这行代码是获取 cur 列表中倒数第二个元素的值,并将其作为参数传递给 check 函数。
具体来说,list.get(m - 2) 表示获取 cur 列表中 index 为 m - 2 的元素的值。然后,将该值作为参数传递给 check 函数,用于检查是否满足某种条件。check 函数的具体实现在该段代码中并未给出,需要根据上下文结合实际情况进行理解。
相关问题
check(list.get(m - 2), list.get(m - 1), cur
这行代码是调用 check 函数,并传入了三个参数:cur 列表中倒数第二个元素的值、cur 列表中最后一个元素的值以及 cur 列表本身。
具体来说,list.get(m - 2) 表示获取 cur 列表中倒数第二个元素的值,list.get(m - 1) 表示获取 cur 列表中最后一个元素的值,cur 表示整个 cur 列表本身。这三个参数将会作为 check 函数的参数,在函数内部被使用。
check 函数的具体实现在该段代码中并未给出,需要根据上下文结合实际情况进行理解。
Find why 'map.get(argsList.get(j))' could be java.time.LocalDateTime (not-null)
It's difficult to provide a specific answer without seeing the context of the code, but generally speaking, if `map` is a `Map` object and `argsList` is a list of keys for the map, then `map.get(argsList.get(j))` could return a `java.time.LocalDateTime` object if the value stored in the map corresponding to the key at index `j` is a `LocalDateTime`.
If the map is defined as `Map<String, Object>`, then any type of object can be stored as values in the map. If the value stored in the map is a `LocalDateTime` object, then calling `map.get(argsList.get(j))` will return that object, which could explain why it's returning a `LocalDateTime`.
To be sure, you can check the data type of the value stored in the map using the `instanceof` operator. For example:
```
Object value = map.get(argsList.get(j));
if (value instanceof LocalDateTime) {
LocalDateTime localDateTime = (LocalDateTime) value;
// Do something with localDateTime
}
```
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![ini-development](https://img-home.csdnimg.cn/images/20210720083646.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)