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 newWorkingTreeModifiedEvent
with the given collections. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispatch
(WorkingTreeModifiedListener listener) Dispatch this event to the given listener.Retrieves theCollection
of repository-relative paths of files that were deleted.Get type of listener this event dispatches toRetrieves theCollection
of repository-relative paths of files that were modified (added or updated).boolean
isEmpty()
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 newWorkingTreeModifiedEvent
with 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:
true
if no files were modified or deleted,false
otherwise
-
getModified
Retrieves theCollection
of repository-relative paths of files that were modified (added or updated).- Returns:
- the set
-
getDeleted
Retrieves theCollection
of repository-relative paths of files that were deleted.- Returns:
- the set
-
getListenerType
Get type of listener this event dispatches to- Specified by:
getListenerType
in classRepositoryEvent<WorkingTreeModifiedListener>
- Returns:
- type of listener this event dispatches to
-
dispatch
Dispatch this event to the given listener.- Specified by:
dispatch
in classRepositoryEvent<WorkingTreeModifiedListener>
- Parameters:
listener
- listener that wants this event.
-