Class ItemAccessor<T extends org.eclipse.swt.widgets.Item>

  • Type Parameters:
    T - the actual object type to access.
    All Implemented Interfaces:
    java.util.function.Supplier<T>
    Direct Known Subclasses:
    CoolItemAccessor, MenuItemAccessor, ToolItemAccessor

    public class ItemAccessor<T extends org.eclipse.swt.widgets.Item>
    extends Accessor<T>
    Accessor class for Item objects.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <S extends org.eclipse.swt.widgets.Item>
      java.util.function.Predicate<S>
      matchText​(java.lang.String text)
      Creates a Predicate for exact text matching.
      static <S extends org.eclipse.swt.widgets.Item>
      java.util.function.Predicate<S>
      matchText​(java.util.regex.Pattern textPattern)
      Creates a Predicate for pattern text matching.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ItemAccessor

        public ItemAccessor​(@Nullable T item)
        Constructs a new ItemAccessor instance.
        Parameters:
        item - the Item instance to access.
      • ItemAccessor

        public ItemAccessor​(java.util.Optional<T> optionalItem)
        Constructs a new ItemAccessor instance.
        Parameters:
        optionalItem - the optional Item instance to access.
      • ItemAccessor

        public ItemAccessor​(Accessor<T> accessor)
        Constructs a new ItemAccessor instance.
        Parameters:
        accessor - the accessor to the Item instance to access.
    • Method Detail

      • matchText

        public static <S extends org.eclipse.swt.widgets.Item> java.util.function.Predicate<S> matchText​(java.lang.String text)
        Creates a Predicate for exact text matching.
        Type Parameters:
        S - the actual widget type.
        Parameters:
        text - the text to match.
        Returns:
        the created Predicate.
      • matchText

        public static <S extends org.eclipse.swt.widgets.Item> java.util.function.Predicate<S> matchText​(java.util.regex.Pattern textPattern)
        Creates a Predicate for pattern text matching.
        Type Parameters:
        S - the actual widget type.
        Parameters:
        textPattern - the pattern to match.
        Returns:
        the created Predicate.