jsdsi
Class Threshold
java.lang.Object
jsdsi.Obj
jsdsi.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
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. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
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).
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.