1. /*
  2. * Copyright 2002-2004 The Apache Software Foundation
  3. *
  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
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  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.
  15. *
  16. */
  17. package org.apache.tools.ant.taskdefs.cvslib;
  18. /**
  19. * Represents a RCS File change.
  20. *
  21. * @version $Revision: 1.5.2.4 $ $Date: 2004/03/09 17:01:40 $
  22. */
  23. class RCSFile {
  24. private String m_name;
  25. private String m_revision;
  26. private String m_previousRevision;
  27. RCSFile(final String name, final String rev) {
  28. this(name, rev, null);
  29. }
  30. RCSFile(final String name,
  31. final String revision,
  32. final String previousRevision) {
  33. m_name = name;
  34. m_revision = revision;
  35. if (!revision.equals(previousRevision)) {
  36. m_previousRevision = previousRevision;
  37. }
  38. }
  39. String getName() {
  40. return m_name;
  41. }
  42. String getRevision() {
  43. return m_revision;
  44. }
  45. String getPreviousRevision() {
  46. return m_previousRevision;
  47. }
  48. }