com.dlsc.flexgantt.model.dateline
Interface IGranularity<T extends IGranularity>

Type Parameters:
T - the object type of the granularity
All Known Implementing Classes:
SimpleGranularity, TimeGranularity

public interface IGranularity<T extends IGranularity>

A granularity describes a time unit (e.g. "Hour", "Minute", ...).

Since:
1.0
Author:
Dirk Lemmermann

Method Summary
 java.lang.String getName()
          Returns the name of the granularity.
 boolean isLarger(T granularity)
          Determines whether the given granularity is larger than the given one.
 boolean isSmaller(T granularity)
          Determines whether the granularity is smaller than the given one.
 

Method Detail

getName

java.lang.String getName()
Returns the name of the granularity.

Returns:
the name of the granularity
Since:
1.0

isSmaller

boolean isSmaller(T granularity)
Determines whether the granularity is smaller than the given one. A granularity is smaller if it represents a smaller time unit. Minutes are smaller than hours, seconds are smaller than minutes.

Parameters:
granularity - the granularity with which to perform the comparison
Returns:
TRUE if the granularity is smaller than the given one
Since:
1.0

isLarger

boolean isLarger(T granularity)
Determines whether the given granularity is larger than the given one. A granularity is larger if it represents a larger time unit. Hours are larger than minutes, days are larger than hours.

Parameters:
granularity - the granularity with which to perform the comparison
Returns:
TRUE if the granularity is larger than the given one
Since:
1.0