KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > sync4j > framework > core > Anchor


1 /**
2  * Copyright (C) 2003-2005 Funambol
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  */

18
19
20 package sync4j.framework.core;
21
22
23 /**
24  * Corresponds to the <Anchor> tag in the metainfo spec
25  *
26  * @author Stefano Fornari @ Funambol
27  *
28  * @version $Id: Anchor.java,v 1.4 2005/03/02 20:57:37 harrie Exp $
29  */

30 public final class Anchor
31 implements java.io.Serializable JavaDoc {
32
33     // ------------------------------------------------------------ Private data
34
private String JavaDoc last;
35     private String JavaDoc next;
36     
37     // ------------------------------------------------------------ Constructors
38
/** For serialization purposes */
39     protected Anchor() {}
40     
41     /**
42      * Creates a new Anchor object
43      *
44      * @param last the synchronization anchor for the previous synchronization
45      * session
46      * @param next the synchronization anchor for the current synchronization
47      * session - NOT NULL
48      *
49      */

50     public Anchor(final String JavaDoc last, final String JavaDoc next) {
51         setNext(next);
52         setLast(last);
53     }
54
55     // ---------------------------------------------------------- Public methods
56

57     /**
58      * Gets the last property
59      *
60      * @return the last property
61      */

62     public String JavaDoc getLast() {
63         return last;
64     }
65
66     /**
67      * Sets the last property
68      *
69      * @param last the last property
70      *
71      */

72     public void setLast(String JavaDoc last) {
73         this.last = last;
74     }
75     
76     /**
77      * Gets the next property
78      *
79      * @return the next property
80      */

81     public String JavaDoc getNext() {
82         return next;
83     }
84     
85     /**
86      * Sets the next property
87      *
88      * @param next the next property
89      *
90      */

91     public void setNext(String JavaDoc next) {
92         this.next = next;
93     }
94 }
95
Popular Tags