issrg.pba.rbac
Class RelativeDate

java.lang.Object
  extended by issrg.pba.rbac.RelativeDate

public class RelativeDate
extends java.lang.Object

This class is just a holder of relative year, month, day, etc integers. It is used as a pack of integers for calculating relative validity periods.

Author:
A.Otenko

Field Summary
 int days
           
 int hours
           
 int minutes
           
 int months
           
 int seconds
           
 int years
           
 
Constructor Summary
RelativeDate(int years, int months, int days, int hours, int minutes, int seconds)
          This constructor builds the RelativeDate using the number of years, months days, hours, minutes and seconds from now.
 
Method Summary
 java.util.Date getDate()
          This method returns the date as if it were counted from 0 AD.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

years

public int years

months

public int months

days

public int days

hours

public int hours

minutes

public int minutes

seconds

public int seconds
Constructor Detail

RelativeDate

public RelativeDate(int years,
                    int months,
                    int days,
                    int hours,
                    int minutes,
                    int seconds)
This constructor builds the RelativeDate using the number of years, months days, hours, minutes and seconds from now. The direction of increment (i.e. should they be added or subtracted from now) depends on the context, e.g. they are subtracted from now to compute Age, but added to compute min and max life span.

Method Detail

getDate

public java.util.Date getDate()
This method returns the date as if it were counted from 0 AD.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object