Changes between Initial Version and Version 1 of Ticket #23571, comment 7


Ignore:
Timestamp:
2024-03-25T14:51:21+01:00 (16 months ago)
Author:
taylor.smock

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23571, comment 7

    initial v1  
    22
    33That might be a pretty significant performance hit, but I'd have to profile. We could ''probably'' cache the results to reduce the performance impact.
     4
     5EDIT: Stream to find freeform text:
     6{{{#!java
     7        TaggingPresets.getTaggingPresets().stream().anyMatch(preset ->
     8                preset.data.stream()
     9                        .filter(KeyedItem.class::isInstance)
     10                        .map(KeyedItem.class::cast)
     11                        .anyMatch(item -> key.equals(item.key) && item instanceof Text)
     12        );
     13}}}