Package org.eclipse.jgit.lib
Enum Class Ref.Storage
- All Implemented Interfaces:
Serializable
,Comparable<Ref.Storage>
,Constable
- Enclosing interface:
- Ref
Location where a
Ref
is stored.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe ref is stored in a file by itself.The ref came from a network advertisement and storage is unknown.The ref does not exist yet, updating it may create it.The ref is stored in thepacked-refs
file, with others. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isLoose()
boolean
isPacked()
static Ref.Storage
Returns the enum constant of this class with the specified name.static Ref.Storage[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NEW
The ref does not exist yet, updating it may create it.Creation is likely to choose
LOOSE
storage. -
LOOSE
The ref is stored in a file by itself.Updating this ref affects only this ref.
-
PACKED
The ref is stored in thepacked-refs
file, with others.Updating this ref requires rewriting the file, with perhaps many other refs being included at the same time.
-
LOOSE_PACKED
-
NETWORK
The ref came from a network advertisement and storage is unknown.This ref cannot be updated without Git-aware support on the remote side, as Git-aware code consolidate the remote refs and reported them to this process.
-
-
Field Details
-
loose
private final boolean loose -
packed
private final boolean packed
-
-
Constructor Details
-
Storage
private Storage(boolean l, boolean p)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isLoose
public boolean isLoose()- Returns:
- true if this storage has a loose file.
-
isPacked
public boolean isPacked()- Returns:
- true if this storage is inside the packed file.
-