Package org.eclipse.jgit.events
Class WorkingTreeModifiedEvent
- java.lang.Object
-
- org.eclipse.jgit.events.RepositoryEvent<WorkingTreeModifiedListener>
-
- org.eclipse.jgit.events.WorkingTreeModifiedEvent
-
public class WorkingTreeModifiedEvent extends RepositoryEvent<WorkingTreeModifiedListener>
ARepositoryEvent
describing changes to the working tree. It is fired whenever aDirCacheCheckout
modifies (adds/deletes/updates) files in the working tree.- Since:
- 4.9
-
-
Constructor Summary
Constructors Constructor Description WorkingTreeModifiedEvent(Collection<String> modified, Collection<String> deleted)
Creates a newWorkingTreeModifiedEvent
with the given collections.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispatch(WorkingTreeModifiedListener listener)
Dispatch this event to the given listener.Collection<String>
getDeleted()
Retrieves theCollection
of repository-relative paths of files that were deleted.Class<WorkingTreeModifiedListener>
getListenerType()
Get type of listener this event dispatches toCollection<String>
getModified()
Retrieves 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
-
-
-
-
Constructor Detail
-
WorkingTreeModifiedEvent
public WorkingTreeModifiedEvent(Collection<String> modified, Collection<String> deleted)
Creates a newWorkingTreeModifiedEvent
with the given collections.- Parameters:
modified
- repository-relative paths that were added or updateddeleted
- repository-relative paths that were deleted
-
-
Method Detail
-
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
@NonNull public Collection<String> getModified()
Retrieves theCollection
of repository-relative paths of files that were modified (added or updated).- Returns:
- the set
-
getDeleted
@NonNull public Collection<String> getDeleted()
Retrieves theCollection
of repository-relative paths of files that were deleted.- Returns:
- the set
-
getListenerType
public Class<WorkingTreeModifiedListener> getListenerType()
Get type of listener this event dispatches to- Specified by:
getListenerType
in classRepositoryEvent<WorkingTreeModifiedListener>
- Returns:
- type of listener this event dispatches to
-
dispatch
public void dispatch(WorkingTreeModifiedListener listener)
Dispatch this event to the given listener.- Specified by:
dispatch
in classRepositoryEvent<WorkingTreeModifiedListener>
- Parameters:
listener
- listener that wants this event.
-
-