問題タブ [enum-class]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
71 参照

java - 列挙型クラス内の値を確認するには?

json オブジェクトから返されたタグに、enum クラス内の値のいずれかが含まれているかどうかを確認したかったのです。

ここに私の列挙型クラスがあります

これは返されたタグです...

"tags":["テディ","屋内","衣服","ネクタイ","人物","クマ","着ている","緑","茶色","ぬいぐるみ","座っている"," man","bow","neck","face","shirt","blue","hat","close","grey","laying","black","glasses","head" ,"ベッド","白","抱っこ","猫","寝ている"]}

私の問題は、それが常にelseステートメントに移動することです。コードのどこが間違っていると思いますか?