如何在Java中检查值是否曾经是键

我正在使用Map,我想知道是否可以检查值是否作为键存在于地图中。 这是地图:

Map<String, List<String>> labelIdentifiersmap = new LinkedHashMap<>();
labelIdentifiersmap.put(labelName, labelNameList);

该地图具有以下输出:

Gets=[g1, g2], IMOVE=[i1, i2, i3, i8], IGET=[i4, i5, i6, i7], Inits=[IMOVE, IGET], Updates=[u1, u2, u3, u4, u5], FIN=[f2, f4, f5, f6, f7], FINALS=[FIN, f1, f3]}

Here IMOVE and IGET are first used as Keys and later they are the Values for Inits and similarly FIN is a key and later value for FINALS. Is it possible to implement a check to see if the values were keys in a map?

评论