На протяжении всей жизни я не могу вытащить простой String ArrayList из моего общего Hashmap: Hashmap < /p>
Я смог получить гораздо более сложные структуры, такие как список Объектов, которые вложены и обладают другими коллекциями, поскольку они рассматриваются как LinkedHashmap при получении. /p>
$nonNull: SomeObject(mappings != null)
$mappings: HashMap() from $nonNull.getMappings()
$test: ArrayList() from $mappings["role"]
< /code>
Я также пробовал много других итераций .. < /p>
$nonNull: SomeObject(mappings != null)
$mappings: HashMap() from $nonNull.getMappings()
$test: ArrayList(size > 0) from (ArrayList) $mappings["role"]
< /code>
$nonNull: SomeObject(mappings != null)
$mappings: HashMap() from $nonNull.getMappings()
$test: List(size > 0) from (List) $mappings["role"]
< /code>
$nonNull: SomeObject(mappings != null)
$mappings: HashMap() from $nonNull.getMappings()
$test: List() from $mappings["role"]
< /code>
$nonNull: SomeObject(mappings != null)
$mappings: HashMap() from $nonNull.getMappings()
$test: List() from $mappings.get("role")
< /code>
$nonNull: SomeObject(mappings != null)
$mappings: HashMap() from $nonNull.getMappings()
$test: ArrayList() from $mappings.get("role")
< /code>
$nonNull: SomeObject(mappings != null)
$mappings: HashMap() from $nonNull.getMappings()
ArrayList($test : size > 0) from $mappings.get("role")
< /code>
Why is it so difficult to pull a simple ArrayList when I can pull incredibly nested structures from this hashmap.
I have ensured I have the proper imports in the .drl file.
I am using mvn dependency Drools 7.58
Подробнее здесь: https://stackoverflow.com/questions/794 ... -in-drools
Drools - Вытаскивание ArrayList из Hashmap в Drools ⇐ JAVA
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение