org.eclipse.jdt.annotation.NonNull类的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(192)

本文整理了Java中org.eclipse.jdt.annotation.NonNull类的一些代码示例,展示了NonNull类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NonNull类的具体详情如下:
包路径:org.eclipse.jdt.annotation.NonNull
类名称:NonNull

NonNull介绍

暂无

代码示例

代码示例来源: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

/**
 * Removes all metadata of a given item
 *
 * @param itemname the name of the item for which the metadata is to be removed.
 */
void removeItemMetadata(@NonNull String name);

代码示例来源: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

/**
 * Returns a collection of all elements in the registry.
 *
 * @return collection of all elements in the registry
 */
@NonNull
Collection<@NonNull E> getAll();

代码示例来源: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

/**
 * Returns list of items which contains all of the given tags.
 *
 * @param typeFilter
 *            - subclass of {@link GenericItem} to filter the resulting list
 *            for.
 * @param tags
 *            - array of tags to be present on the returned items.
 * @return list of items which contains all of the given tags, which is
 *         filtered by the given type filter.
 */
public @NonNull <T extends Item> Collection<T> getItemsByTag(@NonNull Class<T> typeFilter, @NonNull String... tags);

代码示例来源: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

@Override
protected Metadata toElement(@NonNull String key, @NonNull Metadata persistableElement) {
  return persistableElement;
}

代码示例来源:origin: eclipse/smarthome

public Min(@NonNull Class<? extends @NonNull Quantity<?>> dimension) {
  super(dimension);
}

相关文章

微信公众号

最新文章

更多

NonNull类方法