test_class.declarator: THING_TYPE_UID = new ThingTypeUID("binding:type")
test_class.modifier: private static final
test_class.original_string: private static final ThingTypeUID THING_TYPE_UID = new ThingTypeUID("binding:type");
test_class.type: ThingTypeUID
test_class.var_name: THING_TYPE_UID
test_class.declarator: THING_UID = new ThingUID(THING_TYPE_UID, "thingId")
test_class.modifier: private static final
test_class.original_string: private static final ThingUID THING_UID = new ThingUID(THING_TYPE_UID, "thingId");
test_class.type: ThingUID
test_class.var_name: THING_UID
test_class.file: bundles/org.openhab.core.thing/src/test/java/org/openhab/core/thing/util/ThingHelperTest.java
test_class.identifier: ThingHelperTest
test_case.body: @Test
      public void assertThatNoDuplicateChannelsCanBeAdded() {
          ThingTypeUID thingTypeUID = new ThingTypeUID("test", "test");
          ThingUID thingUID = new ThingUID(thingTypeUID, "test");
  
          Thing thing = ThingBuilder.create(thingTypeUID, thingUID)
                  .withChannels(ChannelBuilder.create(new ChannelUID(thingUID, "channel1"), "").build(),
                          ChannelBuilder.create(new ChannelUID(thingUID, "channel2"), "").build())
                  .build();
  
          assertThrows(IllegalArgumentException.class,
                  () -> ThingHelper.addChannelsToThing(thing,
                          Stream.of(ChannelBuilder.create(new ChannelUID(thingUID, "channel2"), "").build(),
                                  ChannelBuilder.create(new ChannelUID(thingUID, "channel3"), "").build())
                                  .collect(toList())));
      }
test_case.class_method_signature: ThingHelperTest.assertThatNoDuplicateChannelsCanBeAdded()
test_case.full_signature: @Test public void assertThatNoDuplicateChannelsCanBeAdded()
test_case.identifier: assertThatNoDuplicateChannelsCanBeAdded
test_case.invocations: build withChannels create build create build create assertThrows addChannelsToThing collect of build create build create toList
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void assertThatNoDuplicateChannelsCanBeAdded()
focal_class.file: bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/util/ThingHelper.java
focal_class.identifier: ThingHelper
focal_class.class_method_signature: ThingHelper.equals(Thing a, Thing b)
focal_class.full_signature: public static boolean equals(Thing a, Thing b)
focal_class.identifier: equals
focal_class.modifiers: public static
focal_class.parameters: (Thing a, Thing b)
focal_class.return: boolean
focal_class.signature: boolean equals(Thing a, Thing b)
focal_class.class_method_signature: ThingHelper.toString(List<Channel> channels)
focal_class.full_signature: private static String toString(List<Channel> channels)
focal_class.identifier: toString
focal_class.modifiers: private static
focal_class.parameters: (List<Channel> channels)
focal_class.return: String
focal_class.signature: String toString(List<Channel> channels)
focal_class.class_method_signature: ThingHelper.addChannelsToThing(Thing thing, Collection<Channel> channels)
focal_class.full_signature: public static void addChannelsToThing(Thing thing, Collection<Channel> channels)
focal_class.identifier: addChannelsToThing
focal_class.modifiers: public static
focal_class.parameters: (Thing thing, Collection<Channel> channels)
focal_class.return: void
focal_class.signature: void addChannelsToThing(Thing thing, Collection<Channel> channels)
focal_class.class_method_signature: ThingHelper.ensureUniqueChannels(final Channel[] channels)
focal_class.full_signature: public static void ensureUniqueChannels(final Channel[] channels)
focal_class.identifier: ensureUniqueChannels
focal_class.modifiers: public static
focal_class.parameters: (final Channel[] channels)
focal_class.return: void
focal_class.signature: void ensureUniqueChannels(final Channel[] channels)
focal_class.class_method_signature: ThingHelper.ensureUniqueChannels(final Collection<Channel> channels)
focal_class.full_signature: public static void ensureUniqueChannels(final Collection<Channel> channels)
focal_class.identifier: ensureUniqueChannels
focal_class.modifiers: public static
focal_class.parameters: (final Collection<Channel> channels)
focal_class.return: void
focal_class.signature: void ensureUniqueChannels(final Collection<Channel> channels)
focal_class.class_method_signature: ThingHelper.ensureUniqueChannels(final Collection<Channel> channels, final Channel channel)
focal_class.full_signature: public static void ensureUniqueChannels(final Collection<Channel> channels, final Channel channel)
focal_class.identifier: ensureUniqueChannels
focal_class.modifiers: public static
focal_class.parameters: (final Collection<Channel> channels, final Channel channel)
focal_class.return: void
focal_class.signature: void ensureUniqueChannels(final Collection<Channel> channels, final Channel channel)
focal_class.class_method_signature: ThingHelper.ensureUniqueChannels(final Collection<Channel> channels1, final Collection<Channel> channels2)
focal_class.full_signature: private static void ensureUniqueChannels(final Collection<Channel> channels1, final Collection<Channel> channels2)
focal_class.identifier: ensureUniqueChannels
focal_class.modifiers: private static
focal_class.parameters: (final Collection<Channel> channels1, final Collection<Channel> channels2)
focal_class.return: void
focal_class.signature: void ensureUniqueChannels(final Collection<Channel> channels1, final Collection<Channel> channels2)
focal_class.class_method_signature: ThingHelper.ensureUniqueChannels(final Iterator<Channel> channels, final Set<UID> ids)
focal_class.full_signature: private static Set<UID> ensureUniqueChannels(final Iterator<Channel> channels, final Set<UID> ids)
focal_class.identifier: ensureUniqueChannels
focal_class.modifiers: private static
focal_class.parameters: (final Iterator<Channel> channels, final Set<UID> ids)
focal_class.return: Set<UID>
focal_class.signature: Set<UID> ensureUniqueChannels(final Iterator<Channel> channels, final Set<UID> ids)
focal_class.class_method_signature: ThingHelper.merge(Thing thing, ThingDTO updatedContents)
focal_class.full_signature: public static Thing merge(Thing thing, ThingDTO updatedContents)
focal_class.identifier: merge
focal_class.modifiers: public static
focal_class.parameters: (Thing thing, ThingDTO updatedContents)
focal_class.return: Thing
focal_class.signature: Thing merge(Thing thing, ThingDTO updatedContents)
focal_method.body: public static void addChannelsToThing(Thing thing, Collection<Channel> channels) {
          Collection<Channel> mutableChannels = thing.getChannels();
          ensureUniqueChannels(mutableChannels, channels);
          for (Channel channel : channels) {
              ((ThingImpl) thing).addChannel(channel);
          }
      }
focal_method.class_method_signature: ThingHelper.addChannelsToThing(Thing thing, Collection<Channel> channels)
focal_method.full_signature: public static void addChannelsToThing(Thing thing, Collection<Channel> channels)
focal_method.identifier: addChannelsToThing
focal_method.invocations: getChannels ensureUniqueChannels addChannel
focal_method.modifiers: public static
focal_method.parameters: (Thing thing, Collection<Channel> channels)
focal_method.return: void
focal_method.signature: void addChannelsToThing(Thing thing, Collection<Channel> channels)