de.uka.ipd.consensus.foundation.schema
Interface Version

All Superinterfaces:
Comparable, Serializable
All Known Implementing Classes:
VersionImpl

public interface Version
extends Serializable, Comparable

This interface represents one version of a versionable element.

Version:
2006-06-14
Author:
Thomas Much
See Also:
Versionable

Method Summary
 boolean after(Version ver)
          Checks if this version has a timestamp later than the given version.
 boolean before(Version ver)
          Checks if this version has a timestamp earlier than the given version.
 boolean equals(Object obj)
          Checks if this and the given object are equal, i.e. if they represent the same version.
 Date getDate()
          Returns the timestamp of this version, i.e. when this version was created.
 Versionable getVersionable()
          Returns the versionable element.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

after

public boolean after(Version ver)
Checks if this version has a timestamp later than the given version.

Parameters:
ver - the Version to check against
Returns:
true if this version's timestamp is newer than the given version's timestamp
See Also:
getDate()

before

public boolean before(Version ver)
Checks if this version has a timestamp earlier than the given version.

Parameters:
ver - the Version to check against
Returns:
true if this version's timestamp is older than the given version's timestamp
See Also:
getDate()

equals

public boolean equals(Object obj)
Checks if this and the given object are equal, i.e. if they represent the same version.

Parameters:
obj - the object to check against
Returns:
true if both objects are equal, false otherwise
See Also:
Object.equals(java.lang.Object)

getVersionable

public Versionable getVersionable()
Returns the versionable element.

Returns:
the versionable element, never null

getDate

public Date getDate()
Returns the timestamp of this version, i.e. when this version was created.

Returns:
the timestamp Date object, never null