/** * Construct a new note map from an existing note bucket. * * @param root * the root bucket of this note map * @param reader * reader to scan the note branch with. This reader may be * retained by the NoteMap for the life of the map in order to * support lazy loading of entries. * @return the note map built from the note bucket */ static NoteMap newMap(InMemoryNoteBucket root, ObjectReader reader) { NoteMap map = new NoteMap(reader); map.root = root; return map; }
/** * Construct a new empty note map. * * @return an empty note map. */ public static NoteMap newEmptyMap() { NoteMap r = new NoteMap(null /* no reader */); r.root = new LeafBucket(0); return r; }
/** * Load a collection of notes from a tree. * * @param reader * reader to scan the note branch with. This reader may be * retained by the NoteMap for the life of the map in order to * support lazy loading of entries. * @param treeId * the note tree to read. * @return the note map read from the tree. * @throws java.io.IOException * the repository cannot be accessed through the reader. * @throws org.eclipse.jgit.errors.CorruptObjectException * a tree object is corrupt and cannot be read. * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * a tree object wasn't actually a tree. * @throws org.eclipse.jgit.errors.MissingObjectException * a reference tree object doesn't exist. */ public static NoteMap readTree(ObjectReader reader, ObjectId treeId) throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException, IOException { NoteMap map = new NoteMap(reader); map.load(treeId); return map; }
/** * Construct a new note map from an existing note bucket. * * @param root * the root bucket of this note map * @param reader * reader to scan the note branch with. This reader may be * retained by the NoteMap for the life of the map in order to * support lazy loading of entries. * @return the note map built from the note bucket */ static NoteMap newMap(InMemoryNoteBucket root, ObjectReader reader) { NoteMap map = new NoteMap(reader); map.root = root; return map; }
/** * Construct a new note map from an existing note bucket. * * @param root * the root bucket of this note map * @param reader * reader to scan the note branch with. This reader may be * retained by the NoteMap for the life of the map in order to * support lazy loading of entries. * @return the note map built from the note bucket */ static NoteMap newMap(InMemoryNoteBucket root, ObjectReader reader) { NoteMap map = new NoteMap(reader); map.root = root; return map; }
/** * Construct a new empty note map. * * @return an empty note map. */ public static NoteMap newEmptyMap() { NoteMap r = new NoteMap(null /* no reader */); r.root = new LeafBucket(0); return r; }
/** * Construct a new empty note map. * * @return an empty note map. */ public static NoteMap newEmptyMap() { NoteMap r = new NoteMap(null /* no reader */); r.root = new LeafBucket(0); return r; }
/** * Load a collection of notes from a tree. * * @param reader * reader to scan the note branch with. This reader may be * retained by the NoteMap for the life of the map in order to * support lazy loading of entries. * @param treeId * the note tree to read. * @return the note map read from the tree. * @throws IOException * the repository cannot be accessed through the reader. * @throws CorruptObjectException * a tree object is corrupt and cannot be read. * @throws IncorrectObjectTypeException * a tree object wasn't actually a tree. * @throws MissingObjectException * a reference tree object doesn't exist. */ public static NoteMap readTree(ObjectReader reader, ObjectId treeId) throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException, IOException { NoteMap map = new NoteMap(reader); map.load(treeId); return map; }
/** * Load a collection of notes from a tree. * * @param reader * reader to scan the note branch with. This reader may be * retained by the NoteMap for the life of the map in order to * support lazy loading of entries. * @param treeId * the note tree to read. * @return the note map read from the tree. * @throws java.io.IOException * the repository cannot be accessed through the reader. * @throws org.eclipse.jgit.errors.CorruptObjectException * a tree object is corrupt and cannot be read. * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException * a tree object wasn't actually a tree. * @throws org.eclipse.jgit.errors.MissingObjectException * a reference tree object doesn't exist. */ public static NoteMap readTree(ObjectReader reader, ObjectId treeId) throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException, IOException { NoteMap map = new NoteMap(reader); map.load(treeId); return map; }