1
package org.vcs.bazaar.eclipse.internal.core;
5
import org.vcs.bazaar.eclipse.core.model.IBzrBranch;
10
* This is a class to help implementors of IDarcsRepository
13
public abstract class BzrBranch implements IBzrBranch {
18
public BzrBranch( final String name, final URI location ) {
20
this.location = location;
23
public String getName() {
27
public URI getLocation() {
31
public boolean isLocal() {
35
// TDOD: implement getChanges if necessary
36
// public IBzrChanges getChanges() {
37
// return new BzrChanges( this );
41
public boolean equals( final Object otherRepo ) {
42
// make sure wrong types
44
if( !( otherRepo instanceof IBzrBranch ) ) {
47
return ( ( IBzrBranch )otherRepo ).getLocation().equals(
51
public int compareTo( final Object otherRepo ) {
53
if( otherRepo instanceof IBzrBranch ) {
54
IBzrBranch otherBzrRepo = ( IBzrBranch )otherRepo;
55
result = ( otherBzrRepo ).getLocation().compareTo( getLocation() );
57
result = ( ( Comparable )otherRepo ).compareTo( this );