01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18: package org.apache.tools.ant.taskdefs.cvslib;
19:
20: /**
21: * Represents a RCS File change.
22: *
23: */
24: class RCSFile {
25: private String name;
26: private String revision;
27: private String previousRevision;
28:
29: RCSFile(final String name, final String rev) {
30: this (name, rev, null);
31: }
32:
33: RCSFile(final String name, final String revision,
34: final String previousRevision) {
35: this .name = name;
36: this .revision = revision;
37: if (!revision.equals(previousRevision)) {
38: this .previousRevision = previousRevision;
39: }
40: }
41:
42: /**
43: * Gets the name of the RCSFile
44: * @return name of the file
45: */
46: String getName() {
47: return name;
48: }
49:
50: /**
51: * Gets the revision number of the RCSFile
52: * @return the revision number (as String)
53: */
54: String getRevision() {
55: return revision;
56: }
57:
58: /**
59: * Gets the previous revision of the RCSFile
60: * @return the previous revision number (as String)
61: */
62: String getPreviousRevision() {
63: return previousRevision;
64: }
65: }
|