Package org.eclipse.jgit.events
Class WorkingTreeModifiedEvent
java.lang.Object
org.eclipse.jgit.events.RepositoryEvent<WorkingTreeModifiedListener>
org.eclipse.jgit.events.WorkingTreeModifiedEvent
A
RepositoryEvent describing changes to the
working tree. It is fired whenever a
DirCacheCheckout modifies
(adds/deletes/updates) files in the working tree.- Since:
- 4.9
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWorkingTreeModifiedEvent(Collection<String> modified, Collection<String> deleted) Creates a newWorkingTreeModifiedEventwith the given collections. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatch(WorkingTreeModifiedListener listener) Dispatch this event to the given listener.Retrieves theCollectionof repository-relative paths of files that were deleted.Get type of listener this event dispatches toRetrieves theCollectionof repository-relative paths of files that were modified (added or updated).booleanisEmpty()Determines whether there are any changes recorded in this event.Methods inherited from class org.eclipse.jgit.events.RepositoryEvent
getRepository, setRepository, toString
-
Field Details
-
modified
-
deleted
-
-
Constructor Details
-
WorkingTreeModifiedEvent
Creates a newWorkingTreeModifiedEventwith the given collections.- Parameters:
modified- repository-relative paths that were added or updateddeleted- repository-relative paths that were deleted
-
-
Method Details
-
isEmpty
public boolean isEmpty()Determines whether there are any changes recorded in this event.- Returns:
trueif no files were modified or deleted,falseotherwise
-
getModified
Retrieves theCollectionof repository-relative paths of files that were modified (added or updated).- Returns:
- the set
-
getDeleted
Retrieves theCollectionof repository-relative paths of files that were deleted.- Returns:
- the set
-
getListenerType
Get type of listener this event dispatches to- Specified by:
getListenerTypein classRepositoryEvent<WorkingTreeModifiedListener>- Returns:
- type of listener this event dispatches to
-
dispatch
Dispatch this event to the given listener.- Specified by:
dispatchin classRepositoryEvent<WorkingTreeModifiedListener>- Parameters:
listener- listener that wants this event.
-