NetList

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.hn
Interface NetList

    public interface NetList

A list comprising of homenetwork elements such as Device or NetModule. The application may retrieve such a list from `NetManager`, `getNetModules` * or `getDevices`. The application may refine the list by applying a `PropertyFilter`.

Method Summary
`boolean` | `contains(Object element)` Indicates whether an element is included in this NetList.
`NetList` | `filterElement(PropertyFilter filter)` Applies a new `PropertyFilter` to this element list and returns a new list.
`Object` | `getElement(int index)` Returns the element indexed by a number.
`Enumeration` | `getElements()` Returns all elements in this NetList in `Enumeration`.
`int` | `indexOf(Object element)` Returns the index of an element in this element list.
`int` | `size()` Returns the size of this list.

Method Detail

### contains

    boolean contains(Object element)

  Indicates whether an element is included in this NetList.

  Parameters:
    `element` - the element to check whether it is in the list
  Returns:
    true if the element is in the list; otherwise false.

### getElement

    Object getElement(int index)

  Returns the element indexed by a number.

  Parameters:
    `index` - specified index of the element
  Returns:
    element indexed by the number

### getElements

    Enumeration getElements()

  Returns all elements in this NetList in `Enumeration`. In Homenetwork, NetList can be used to retrieve a list of Devices or a list of NetModules. In either case, a corresponding type of object is returned.

  Returns:
    An enumeration of Device or NetModule elements

### filterElement

    NetList filterElement(PropertyFilter filter)

  Applies a new `PropertyFilter` to this element list and returns a new list.

  Parameters:
    `filter` - new filter
  Returns:
    new element list generated by new filter
  See Also:
    `PropertyFilter`

### indexOf

    int indexOf(Object element)

  Returns the index of an element in this element list.

  Parameters:
    `element` - to be checked
  Returns:
    index of an element in this list. If there is no such element in this list, returns -1.

### size

    int size()

  Returns the size of this list.

  Returns:
    size of the element list

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD