jsdsi
Class Validity

java.lang.Object
  extended byjsdsi.Obj
      extended byjsdsi.Validity
All Implemented Interfaces:
java.io.Serializable

public class Validity
extends Obj

A validity period and a set of online tests.

Version:
$Revision: 1.4.2.1 $ $Date: 2005/11/08 03:12:52 $
Author:
Sameer Ajmani, Sean Radford
See Also:
Serialized Form

Field Summary
 
Fields inherited from class jsdsi.Obj
_obj
 
Constructor Summary
Validity(java.util.Date b, java.util.Date a)
          Creates a new Validity from two given date bounds.
Validity(java.util.Date b, java.util.Date a, OnlineTest[] t)
          Creates a new Validity from two given date bounds and an array of online tests.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 java.util.Date getNotAfter()
           
 java.util.Date getNotBefore()
           
 OnlineTest[] getOnlineTests()
           
 int hashCode()
           
static boolean implies(Validity v1, Validity v2)
           
 Validity intersect(Validity v)
          Intersects this Validity with another and returns the resulting Validity.
 SexpList toSexp()
          Creates an SexpList -representation from this SDSI-object.
 boolean valid()
          Checks if this Validity is valid now.
 
Methods inherited from class jsdsi.Obj
parseObj, parseObj, readResolve, toByteArray, toString, toString, toTransport
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Validity

public Validity(java.util.Date b,
                java.util.Date a,
                OnlineTest[] t)
Creates a new Validity from two given date bounds and an array of online tests.

Parameters:
b - not-before-bound.
a - not-after-bound.
t - array of onlie tests (may be null).

Validity

public Validity(java.util.Date b,
                java.util.Date a)
Creates a new Validity from two given date bounds.

Parameters:
b - not-before-bound.
a - not-after-bound.
Method Detail

valid

public boolean valid()
Checks if this Validity is valid now.

Returns:
true if this Validity is valid at this juncture, false otherwise.

getNotBefore

public java.util.Date getNotBefore()
Returns:
the not-before date.

getNotAfter

public java.util.Date getNotAfter()
Returns:
the not-after date.

getOnlineTests

public OnlineTest[] getOnlineTests()
Returns:
an array of online tests.

intersect

public Validity intersect(Validity v)
Intersects this Validity with another and returns the resulting Validity.

Parameters:
v - Validity to intersect this Validity with.
Returns:
the intersection of this and v.

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in class Obj
See Also:
Object.equals(Object)

implies

public static boolean implies(Validity v1,
                              Validity v2)
Returns:
true iff v1 is valid whenever v2 is valid

hashCode

public int hashCode()
Specified by:
hashCode in class Obj
See Also:
Object.hashCode()

toSexp

public SexpList toSexp()
Description copied from class: Obj
Creates an SexpList -representation from this SDSI-object.

Specified by:
toSexp in class Obj
Returns:
an SexpList that represents this SDSI-object.


Copyright © 2002-2006 JSDSI. All Rights Reserved.