Package com.google.gerrit.entities
Class Project.NameKey
- java.lang.Object
-
- com.google.gerrit.entities.Project.NameKey
-
- All Implemented Interfaces:
Serializable
,Comparable<Project.NameKey>
- Direct Known Subclasses:
AllProjectsName
,AllUsersName
- Enclosing class:
- Project
public static class Project.NameKey extends Object implements Serializable, Comparable<Project.NameKey>
Project name key.This class has subclasses such as
AllProjectsName
, which make Guice injection more convenient. Subclasses must compare equal if they have the same name, regardless of the specific class. This implies that subclasses may not add additional fields.Because of this unusual subclassing behavior, this class is not an
@AutoValue
, unlike other key types in this package. However, this is strictly an implementation detail; its interface and semantics are otherwise analogous to the@AutoValue
types.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static String
asStringOrNull(Project.NameKey key)
int
compareTo(Project.NameKey o)
boolean
equals(Object b)
String
get()
int
hashCode()
static Project.NameKey
parse(String str)
Parse a Project.NameKey out of a string representation.String
toString()
-
-
-
Constructor Detail
-
NameKey
protected NameKey(String name)
-
-
Method Detail
-
parse
public static Project.NameKey parse(String str)
Parse a Project.NameKey out of a string representation.
-
asStringOrNull
public static String asStringOrNull(Project.NameKey key)
-
get
public String get()
-
compareTo
public final int compareTo(Project.NameKey o)
- Specified by:
compareTo
in interfaceComparable<Project.NameKey>
-
-