Package org.eclipse.jgit.lib
Class FileModeCache.CacheItem
- java.lang.Object
-
- org.eclipse.jgit.lib.FileModeCache.CacheItem
-
- Enclosing class:
- FileModeCache
public static class FileModeCache.CacheItem extends java.lang.ObjectAn item from aFileModeCache, recording information about a git path (known from context).
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,FileModeCache.CacheItem>childrenprivate FileModemode
-
Constructor Summary
Constructors Constructor Description CacheItem(FileMode mode)Creates a newFileModeCache.CacheItem.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileModeCache.CacheItemchild(java.lang.String childName)Retrieves an immediate child of thisFileModeCache.CacheItemby name.FileModegetMode()Retrieves the cachedFileMode.FileModeCache.CacheIteminsert(java.lang.String childName, FileMode childMode)Inserts a new cachedFileModeas an immediate child of thisFileModeCache.CacheItem.FileModeCache.CacheItemremove(java.lang.String childName)Removes the immediate child with the given name.(package private) voidsetMode(FileMode mode)
-
-
-
Field Detail
-
children
private java.util.Map<java.lang.String,FileModeCache.CacheItem> children
-
-
Constructor Detail
-
CacheItem
public CacheItem(@NonNull FileMode mode)
Creates a newFileModeCache.CacheItem.- Parameters:
mode-FileModeto cache
-
-
Method Detail
-
child
public FileModeCache.CacheItem child(java.lang.String childName)
Retrieves an immediate child of thisFileModeCache.CacheItemby name.- Parameters:
childName- name of the child to get- Returns:
- the
FileModeCache.CacheItem, ornullif no such child is known
-
insert
public FileModeCache.CacheItem insert(java.lang.String childName, @NonNull FileMode childMode)
Inserts a new cachedFileModeas an immediate child of thisFileModeCache.CacheItem. If there is already a child with the same name, it is overwritten.- Parameters:
childName- name of the child to createchildMode-FileModeto cache- Returns:
- the new
FileModeCache.CacheItemcreated for the child
-
remove
public FileModeCache.CacheItem remove(java.lang.String childName)
Removes the immediate child with the given name.- Parameters:
childName- name of the child to remove- Returns:
- the previously cached
FileModeCache.CacheItem, if any
-
-