org.mmbase.datatypes
Interface SequentialDataType<E extends Comparable>

All Superinterfaces:
Comparable<DataType<E>>, DataType<E>, Descriptor, Serializable
All Known Implementing Classes:
Duration.DataType, IntegerDataType, LongDataType, WeekdaysDataType

public interface SequentialDataType<E extends Comparable>
extends DataType<E>

A sequential datatype is a datatype of which the values are 'sequential', i.e. every value has a well defined previous and next value.

Since:
MMBase-2.0
Version:
$Id: SequentialDataType.java 41983 2010-04-20 15:27:34Z michiel $
Author:
Michiel Meeuwissen

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mmbase.datatypes.DataType
DataType.Restriction<D extends Serializable>
 
Field Summary
 
Fields inherited from interface org.mmbase.datatypes.DataType
ENFORCE_ABSOLUTE, ENFORCE_ALWAYS, ENFORCE_NEVER, ENFORCE_ONCHANGE, ENFORCE_ONCREATE, ENFORCE_ONVALIDATE, PROCESS_GET, PROCESS_SET, VALID, XMLNS
 
Method Summary
 E decrease(E pos)
          Given a certain value, returns the value with is 1 smaller.
 E first()
          Returns a natural 'first' value.
 E increase(E pos)
          Given a certain value, returns the value with is 1 bigger.
 
Methods inherited from interface org.mmbase.datatypes.DataType
cast, castAndValidate, castForSearch, castOrException, checkType, clone, clone, finish, getBaseType, getBaseTypeIdentifier, getCommitProcessor, getDefaultValue, getDefaultValue, getDeleteProcessor, getEnforceStrength, getEnumerationFactory, getEnumerationRestriction, getEnumerationValue, getEnumerationValues, getHandler, getHandlers, getOrigin, getProcessor, getProcessor, getRequiredRestriction, getStyleClasses, getTypeAsClass, getUniqueRestriction, isFinished, isRequired, isUnique, preCast, rewrite, setCommitProcessor, setDefaultValue, setProcessor, setProcessor, setRequired, setUnique, toXml, toXml, validate, validate
 
Methods inherited from interface org.mmbase.bridge.Descriptor
getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

increase

E increase(E pos)
Given a certain value, returns the value with is 1 bigger. It can return null if there is no such value (and the given value is the biggest one possible)


decrease

E decrease(E pos)
Given a certain value, returns the value with is 1 smaller. It can return null if there is no such value (and the given value is the smallest one possible)


first

E first()
Returns a natural 'first' value. This may return some kind of 0

Since:
MMBase-2.0


MMBase 2.0-SNAPSHOT - null