Statistics
| Revision:

svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.library / org.gvsig.timesupport / org.gvsig.timesupport.lib / org.gvsig.timesupport.lib.api / src / main / java / org / gvsig / timesupport / Instant.java @ 42003

History | View | Annotate | Download (2.64 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 */
22
package org.gvsig.timesupport;
23

    
24

    
25
/**
26
 * <p>
27
 * An Instant represents a position in a time scale. In practice, 
28
 * an instant is an interval whose duration is less than the resolution
29
 * of the time scale.
30
 * </p>
31
 * <p>All the Instant subclasses have to be immutable and have to 
32
 * provide a Chronology as well. All standard Chronology classes are
33
 * also immutable.
34
 * </p>
35
 * <p>
36
 * A huge part of the documentation of this class has been retrieved
37
 * from the joda-time library.
38
 * </p>
39
 * 
40
 * @see http://joda-time.sourceforge.net
41
 * @see https://gvsig.org/web/projects/gvsig-desktop/docs/devel/org-gvsig-sensors/1-0.0/analysis-and-design/detailed-view/time-support/libraries/org-gvsig-timesupport-lib
42
 * 
43
 * @author gvSIG Team
44
 * @version $Id$
45
 * 
46
 */
47
public interface Instant extends Time{
48
   
49
    /**
50
     * Is this instant equal to the instant passed in comparing solely by millisecond. 
51
     * @param instant
52
     *          an instant to check against, null means now 
53
     * @return
54
     *          <code>true</code> if the instant is equal to the instant passed in
55
     */
56
    public boolean isEqual(Instant instant);
57
    
58
    /**
59
     * Is this instant after the instant passed in comparing solely by millisecond. 
60
     * @param instant
61
     *          an instant to check against, null means now 
62
     * @return
63
     *          <code>true</code> if the instant is after the instant passed in
64
     */
65
    public boolean isAfter(Instant instant);
66
    
67
    /**
68
     * Is this instant before the instant passed in comparing solely by millisecond. 
69
     * @param instant
70
     *          an instant to check against, null means now 
71
     * @return
72
     *          <code>true</code> if the instant is before the instant passed in
73
     */
74
    public boolean isBefore(Instant instant);
75
}