Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rice.p2p.past.gc
Class GCIdSet

    java.lang.Object
      rice.p2p.past.gc.GCIdSet

All Implemented Interfaces:
  IdSet, java.io.Serializable

public class GCIdSet
extends java.lang.Object
implements IdSet

Version:
  $Id: GCIdSet.java 2302 2005-03-11 00:58:26Z jeffh $
Author:
  Alan Mislove, Peter Druschel
See Also:
  Serialized Form

Field Summary
`protected IdSet` | `ids` DESCRIBE THE FIELD
`protected java.util.SortedMap` | `timeouts` DESCRIBE THE FIELD

Constructor Summary
`protected` | `GCIdSet(IdFactory factory)` Constructor
`protected` | `GCIdSet(IdSet set, java.util.SortedMap timeouts)` Constructor

Method Summary
`void` | `addId(Id id)` add a member
`Id[]` | `asArray()` return this set as an array
`IdSet` | `build()` Returns a new, empty IdSet of this type
`java.lang.Object` | `clone()` Clones this object
`boolean` | `equals(java.lang.Object o)` Determines equality
`protected GCId` | `getGCId(Id id)` Gets the GCId attribute of the GCIdSet object
`java.util.Iterator` | `getIterator()` return an iterator over the elements of this set
`byte[]` | `hash()` return a hash of this set
`int` | `hashCode()` Returns the hashCode
`boolean` | `isMemberId(Id id)` test membership
`int` | `numElements()` return the number of elements
`void` | `removeId(Id id)` remove a member
`IdSet` | `subSet(IdRange range)` return a subset of this set, consisting of the member ids in a given range
`java.lang.String` | `toString()` Prints out the string

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### ids

    protected IdSet ids

  DESCRIBE THE FIELD

### timeouts

    protected java.util.SortedMap timeouts

  DESCRIBE THE FIELD

Constructor Detail

### GCIdSet

    protected GCIdSet(IdFactory factory)

  Constructor

Parameters:
  `factory` - DESCRIBE THE PARAMETER

### GCIdSet

    protected GCIdSet(IdSet set,
                      java.util.SortedMap timeouts)

  Constructor

Parameters:
  `set` - DESCRIBE THE PARAMETER
  `timeouts` - DESCRIBE THE PARAMETER

Method Detail

### isMemberId

    public boolean isMemberId(Id id)

  test membership

  Specified by:
    `isMemberId` in interface `IdSet`
  Parameters:
    `id` - the id to test
  Returns:
    true of id is a member, false otherwise

### getIterator

    public java.util.Iterator getIterator()

  return an iterator over the elements of this set

  Specified by:
    `getIterator` in interface `IdSet`
  Returns:
    the interator

### getGCId

    protected GCId getGCId(Id id)

  Gets the GCId attribute of the GCIdSet object

  Parameters:
    `id` - DESCRIBE THE PARAMETER
  Returns:
    The GCId value

### numElements

    public int numElements()

  return the number of elements

  Specified by:
    `numElements` in interface `IdSet`
  Returns:
    DESCRIBE THE RETURN VALUE

### addId

    public void addId(Id id)

  add a member

  Specified by:
    `addId` in interface `IdSet`
  Parameters:
    `id` - the id to add

### removeId

    public void removeId(Id id)

  remove a member

  Specified by:
    `removeId` in interface `IdSet`
  Parameters:
    `id` - the id to remove

### subSet

    public IdSet subSet(IdRange range)

  return a subset of this set, consisting of the member ids in a given range

  Specified by:
    `subSet` in interface `IdSet`
  Parameters:
    `range` - DESCRIBE THE PARAMETER
  Returns:
    the subset

### asArray

    public Id[] asArray()

  return this set as an array

  Specified by:
    `asArray` in interface `IdSet`
  Returns:
    the array

### hash

    public byte[] hash()

  return a hash of this set

  Specified by:
    `hash` in interface `IdSet`
  Returns:
    the hash of this set

### equals

    public boolean equals(java.lang.Object o)

  Determines equality

  Parameters:
    `o` - DESCRIBE THE PARAMETER
  Returns:
    Equals

### hashCode

    public int hashCode()

  Returns the hashCode

  Returns:
    hashCode

### toString

    public java.lang.String toString()

  Prints out the string

  Returns:
    A string

### clone

    public java.lang.Object clone()

  Clones this object

  Specified by:
    `clone` in interface `IdSet`
  Returns:
    a clone

### build

    public IdSet build()

  Returns a new, empty IdSet of this type

  Specified by:
    `build` in interface `IdSet`
  Returns:
    A new IdSet

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Rice Pastry API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2005 - Rice Pastry.