com.sun.jini.lookup.entry
Class LookupAttributes

java.lang.Object
  |
  +--com.sun.jini.lookup.entry.LookupAttributes

public class LookupAttributes
extends java.lang.Object

Some simple utilities for manipulating lookup service attributes. These are not high-performance operations; it is expected that they are called relatively infrequently.


Method Summary
static Entry[] add(Entry[] attrSets, Entry[] addAttrSets)
          Return a new array that has the elements of addAttrSets (that are not duplicates of elements already in attrSets) added to the elements of attrSets.
static Entry[] add(Entry[] attrSets, Entry[] addAttrSets, boolean checkSC)
          Return a new array that has the elements of addAttrSets (that are not duplicates of elements already in attrSets) added to the elements of attrSets.
static boolean equal(Entry e1, Entry e2)
          Test that two entries are the same type, with the same public fields.
static boolean matches(Entry tmpl, Entry e)
          Test if tmpl is the same class as or a superclass of e, and that every non-null public field of tmpl is the same as the corresponding field of e.
static Entry[] modify(Entry[] attrSets, Entry[] attrSetTmpls, Entry[] modAttrSets)
          Return a new array that contains copies of the attributes in attrSets, modified according to attrSetTmpls and modAttrSets.
static Entry[] modify(Entry[] attrSets, Entry[] attrSetTmpls, Entry[] modAttrSets, boolean checkSC)
          Return a new array that contains copies of the attributes in attrSets, modified according to attrSetTmpls and modAttrSets.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

add

public static Entry[] add(Entry[] attrSets,
                          Entry[] addAttrSets)
Return a new array that has the elements of addAttrSets (that are not duplicates of elements already in attrSets) added to the elements of attrSets. Attribute equality is defined in terms of MarshalledObject.equals on field values. The parameter arrays are not modified.

add

public static Entry[] add(Entry[] attrSets,
                          Entry[] addAttrSets,
                          boolean checkSC)
Return a new array that has the elements of addAttrSets (that are not duplicates of elements already in attrSets) added to the elements of attrSets. Attribute equality is defined in terms of MarshalledObject.equals on field values. The parameter arrays are not modified. If checkSC is true, then throw a SecurityException if any elements of addAttrSets are instanceof ServiceControlled.

modify

public static Entry[] modify(Entry[] attrSets,
                             Entry[] attrSetTmpls,
                             Entry[] modAttrSets)
Return a new array that contains copies of the attributes in attrSets, modified according to attrSetTmpls and modAttrSets. The parameter arrays and their Entry instances are not modified.

modify

public static Entry[] modify(Entry[] attrSets,
                             Entry[] attrSetTmpls,
                             Entry[] modAttrSets,
                             boolean checkSC)
Return a new array that contains copies of the attributes in attrSets, modified according to attrSetTmpls and modAttrSets. The parameter arrays and their Entry instances are not modified. If checkSC is true, then throw a SecurityException if any elements of attrSets that would be deleted or modified are instanceof ServiceControlled.

equal

public static boolean equal(Entry e1,
                            Entry e2)
Test that two entries are the same type, with the same public fields. Attribute equality is defined in terms of MarshalledObject.equals on field values.

matches

public static boolean matches(Entry tmpl,
                              Entry e)
Test if tmpl is the same class as or a superclass of e, and that every non-null public field of tmpl is the same as the corresponding field of e. Attribute equality is defined in terms of MarshalledObject.equals on field values.


Copyright © 1999 Sun Microsystems, Inc. All rights reserved