jsdsi
Class Threshold

java.lang.Object
  extended byjsdsi.Obj
      extended byjsdsi.Threshold
All Implemented Interfaces:
java.io.Serializable, Subject

public class Threshold
extends Obj
implements Subject

A subject that can delegate authority to any K of N specified subjects. For example, if K is 2, N is 3, and the subjects are Alice, Bob, and Carol, any two of those subjects can pass on any authority granted to this subject (if delegation is permitted).

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

Nested Class Summary
 
Nested classes inherited from class jsdsi.Subject
Subject.Default
 
Field Summary
 
Fields inherited from class jsdsi.Obj
_obj
 
Constructor Summary
Threshold(Subject[] s, int t)
          Creates a new Threshold from an array of subjects and a threshold.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 Subject[] getSubjects()
           
 int getThreshold()
           
 int hashCode()
           
 SexpList toSexp()
          Creates an SexpList -representation from this SDSI-object.
 SexpList toSexp(Principal iss)
           
 
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

Threshold

public Threshold(Subject[] s,
                 int t)
Creates a new Threshold from an array of subjects and a threshold.

Parameters:
s - array of subjects.
t - threshold number (at most subjects.length).
Method Detail

getThreshold

public int getThreshold()
Returns:
the threshold number of this Threshold.

getSubjects

public Subject[] getSubjects()
Returns:
the array of subjects of this Threshold.

equals

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

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 interface Subject
Specified by:
toSexp in class Obj
Returns:
an SexpList that represents this SDSI-object.

toSexp

public SexpList toSexp(Principal iss)


Copyright © 2002-2006 JSDSI. All Rights Reserved.