本文整理了Java中org.eclipse.jdt.annotation.NonNull.<init>()
方法的一些代码示例,展示了NonNull.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull.<init>()
方法的具体详情如下:
包路径:org.eclipse.jdt.annotation.NonNull
类名称:NonNull
方法名:<init>
暂无
代码示例来源:origin: eclipse/smarthome
/**
* Removes an element and returns the removed element.
*
* @param key key of the element that should be removed
* @return element that was removed, or null if no element with the given
* key exists
*/
E remove(@NonNull K key);
代码示例来源:origin: eclipse/smarthome
/**
* This method retrieves all items that are currently available in the registry
*
* @return a collection of all available items
*/
public @NonNull Collection<@NonNull Item> getItems();
代码示例来源:origin: eclipse/smarthome
/**
* This method retrieves all items that match a given search pattern
*
* @return a collection of all items matching the search pattern
*/
public @NonNull Collection<@NonNull Item> getItems(@NonNull String pattern);
代码示例来源:origin: eclipse/smarthome
/**
* Returns list of items with a certain type containing all of the given tags.
*
* @param type
* - item type as defined by {@link ItemFactory}s
* @param tags
* - array of tags to be present on the returned items.
* @return list of items which contains all of the given tags.
*/
public @NonNull Collection<Item> getItemsByTagAndType(@NonNull String type, @NonNull String... tags);
代码示例来源:origin: eclipse/smarthome
/**
* Adds a {@link RegistryChangeListener} to the registry.
*
* @param listener registry change listener
*/
void addRegistryChangeListener(@NonNull RegistryChangeListener<E> listener);
代码示例来源:origin: eclipse/smarthome
/**
* Removes a {@link RegistryChangeListener} from the registry.
*
* @param listener registry change listener
*/
void removeRegistryChangeListener(@NonNull RegistryChangeListener<E> listener);
代码示例来源:origin: eclipse/smarthome
/**
* This method retrieves a single item from the registry.
*
* @param name the item name
* @return the uniquely identified item
* @throws ItemNotFoundException if no item matches the input
*/
public @NonNull Item getItem(String name) throws ItemNotFoundException;
代码示例来源:origin: eclipse/smarthome
/**
* This method retrieves a single item from the registry.
* Search patterns and shortened versions are supported, if they uniquely identify an item
*
* @param name the item name, a part of the item name or a search pattern
* @return the uniquely identified item
* @throws ItemNotFoundException if no item matches the input
* @throws ItemNotUniqueException if multiply items match the input
*/
public @NonNull Item getItemByPattern(@NonNull String name) throws ItemNotFoundException, ItemNotUniqueException;
代码示例来源:origin: eclipse/smarthome
/**
* This method retrieves all items with the given type
*
* @param type
* - item type as defined by {@link ItemFactory}s
* @return a collection of all items of the given type
*/
public @NonNull Collection<Item> getItemsOfType(@NonNull String type);
代码示例来源:origin: eclipse/smarthome
/**
* Adds an element.
*
* @param element element to be added
*/
void add(@NonNull E element);
代码示例来源:origin: eclipse/smarthome
/**
* Returns list of items which contains all of the given tags.
*
* @param tags
* - array of tags to be present on the returned items.
* @return list of items which contains all of the given tags.
*/
public @NonNull Collection<Item> getItemsByTag(@NonNull String... tags);
代码示例来源:origin: eclipse/smarthome
/**
* Transforms the key into a string representation.
*
* @param key key
* @return string representation of the key
*/
protected abstract @NonNull String keyToString(@NonNull K key);
代码示例来源:origin: eclipse/smarthome
/**
* Updates an element.
*
* @param element element to be updated
* @return returns the old element or null if no element with the same key
* exists
*/
E update(@NonNull E element);
代码示例来源:origin: eclipse/smarthome
/**
* Adds the given element to the according {@link ManagedProvider}.
*
* @param element element to be added (must not be null)
* @return the added element or newly created object of the same type
* @throws IllegalStateException if no ManagedProvider is available
*/
public @NonNull E add(@NonNull E element);
代码示例来源:origin: eclipse/smarthome
/**
* Converts the persistable element into the original element.
*
* @param key key
* @param persistableElement persistable element
* @return original element
*/
protected abstract E toElement(@NonNull String key, @NonNull PE persistableElement);
代码示例来源:origin: eclipse/smarthome
/**
* Removes the given element from the according {@link ManagedProvider}.
*
* @param key key of the element (must not be null)
* @return element that was removed, or null if no element with the given
* key exists
* @throws IllegalStateException if no ManagedProvider is available
*/
public @Nullable E remove(@NonNull K key);
}
代码示例来源:origin: eclipse/smarthome
private @NonNull State convertOrUndef(QuantityType<?> quantityState, Unit<?> targetUnit) {
QuantityType<?> converted = quantityState.toUnit(targetUnit);
if (converted != null) {
return converted;
}
return UnDefType.UNDEF;
}
代码示例来源:origin: eclipse/smarthome
/**
* Translates the Items class simple name into a type name understandable by
* the {@link ItemFactory}s.
*
* @param item the Item to translate the name
* @return the translated ItemTypeName understandable by the {@link ItemFactory}s
*/
private @NonNull String toItemFactoryName(Item item) {
return item.getType();
}
代码示例来源:origin: eclipse/smarthome
/**
* Removes all metadata of a given item
*
* @param itemname the name of the item for which the metadata is to be removed.
*/
@Override
public void removeItemMetadata(@NonNull String name) {
logger.debug("Removing all metadata for item {}", name);
getAll().stream().filter(MetadataPredicates.ofItem(name)).map(Metadata::getUID).forEach(this::remove);
}
代码示例来源:origin: eclipse/smarthome
private List<@NonNull String> getMemberNamesRecursively(GroupItem groupItem, Collection<Item> allItems) {
List<@NonNull String> memberNames = new ArrayList<>();
for (Item item : allItems) {
if (item.getGroupNames().contains(groupItem.getName())) {
memberNames.add(item.getName());
if (item instanceof GroupItem) {
memberNames.addAll(getMemberNamesRecursively((GroupItem) item, allItems));
}
}
}
return memberNames;
}
内容来源于网络,如有侵权,请联系作者删除!