summaryrefslogtreecommitdiff
path: root/platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2014-09-04 13:25:33 -0700
committerTor Norbye <tnorbye@google.com>2014-09-04 13:25:33 -0700
commitd245f58efbfc26b13b9b9d5e52e6a83a0d76216c (patch)
treebca7d49005d81d10c70bc3f547df041c636b4300 /platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java
parent9cde0e3c015174898df8b8f3672185941fad4786 (diff)
parentc3d3a90f6b4ead083d63e28e6b9fcea93d675678 (diff)
downloadidea-d245f58efbfc26b13b9b9d5e52e6a83a0d76216c.tar.gz
Merge remote-tracking branch 'aosp/upstream-master' into merge
Diffstat (limited to 'platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java')
-rw-r--r--platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java b/platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java
index 81ff874979bd..e205009a4c0d 100644
--- a/platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java
+++ b/platform/dvcs-api/src/com/intellij/dvcs/push/PushSpec.java
@@ -16,28 +16,32 @@
package com.intellij.dvcs.push;
import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
/**
- * Specified a push from-to settings for one repository
+ * For a single repository, specifies what is pushed and where.
*/
-public class PushSpec {
+public class PushSpec<S extends PushSource, T extends PushTarget> {
- @NotNull private PushSource mySource;
- @Nullable private PushTarget myTarget;
+ @NotNull private S mySource;
+ @NotNull private T myTarget;
- public PushSpec(@NotNull PushSource source, @Nullable PushTarget target) {
+ public PushSpec(@NotNull S source, @NotNull T target) {
mySource = source;
myTarget = target;
}
@NotNull
- public PushSource getSource() {
+ public S getSource() {
return mySource;
}
- @Nullable
- public PushTarget getTarget() {
+ @NotNull
+ public T getTarget() {
return myTarget;
}
+
+ @Override
+ public String toString() {
+ return mySource + "->" + myTarget;
+ }
}