Changeset 13109 in josm for trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java
- Timestamp:
- 2017-11-11T02:03:41+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/io/ChangesetCommentModel.java
r10210 r13109 2 2 package org.openstreetmap.josm.gui.io; 3 3 4 import java.util.Arrays; 5 import java.util.List; 4 6 import java.util.Objects; 7 import java.util.stream.Collectors; 5 8 6 9 import org.openstreetmap.josm.gui.util.ChangeNotifier; … … 35 38 return comment == null ? "" : comment; 36 39 } 40 41 /** 42 * Extracts the list of hashtags from the comment text. 43 * @return the list of hashtags from the comment text. Can be empty, but not null. 44 * @since 13109 45 */ 46 public List<String> findHashTags() { 47 return Arrays.stream(comment.split("\\s")).filter(s -> s.length() >= 2 && s.charAt(0) == '#').collect(Collectors.toList()); 48 } 37 49 }
Note:
See TracChangeset
for help on using the changeset viewer.