update copyright
[fedora-idea.git] / plugins / svn4idea / src / org / jetbrains / idea / svn / integrate / SvnBranchItem.java
blobf9e428d1becfe7ecb060c207edcaa858d0422d4d
1 /*
2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 package org.jetbrains.idea.svn.integrate;
18 import java.util.Date;
20 /**
21 * @author yole
23 public class SvnBranchItem implements Comparable<SvnBranchItem> {
24 private String myUrl;
25 private long myCreationDateMillis;
26 private long myRevision;
28 // to be serializable
29 public SvnBranchItem() {
32 public SvnBranchItem(final String url, final Date creationDate, final long revision) {
33 myUrl = url;
34 // descendant can be passed (and is passed) (java.util.Date is not final)
35 myCreationDateMillis = creationDate.getTime();
36 myRevision = revision;
39 public void setUrl(final String url) {
40 myUrl = url;
43 public void setCreationDateMillis(final long creationDate) {
44 myCreationDateMillis = creationDate;
47 public void setRevision(final long revision) {
48 myRevision = revision;
51 public String getUrl() {
52 return myUrl;
55 public long getCreationDateMillis() {
56 return myCreationDateMillis;
59 public long getRevision() {
60 return myRevision;
63 public int compareTo(SvnBranchItem o) {
64 // === -compare()
65 return myCreationDateMillis < o.myCreationDateMillis ? 1 : ((myCreationDateMillis == o.myCreationDateMillis) ? 0 : -1);