Enum ItemList.SynchronizeOption

    • Enum Constant Detail

      • FULL

        public static final ItemList.SynchronizeOption FULL
        Synchronize the members so that it contains all of the items matching the filter and no items not matching the filter. This options can both remove and add members.
      • ADD_ONLY

        public static final ItemList.SynchronizeOption ADD_ONLY
        Synchronize the members by adding new items matching the filter. This option will not remove existing members that doesn't match the filter.
      • REMOVE_ONLY

        public static final ItemList.SynchronizeOption REMOVE_ONLY
        Synchronize the members by removing items that doesn't match the filter. This option will not add items that matches the filter but are not found in the list.
    • Constructor Detail

      • SynchronizeOption

        private SynchronizeOption()
    • Method Detail

      • values

        public static ItemList.SynchronizeOption[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ItemList.SynchronizeOption c : ItemList.SynchronizeOption.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ItemList.SynchronizeOption valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • synchronize

        abstract void synchronize​(Set<Integer> existing,
                                  Set<Integer> matching)
        Synchronize the existing members with the items matching the current filter context. The synchonrization should modify the 'existing' set.
        Parameters:
        existing - A set containing the existing members of the item list
        matching - A set containing the items matching the sync filter