net.sf.saxon.om

## Class SingletonSet<T>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractSet<T>
    - - net.sf.saxon.om.SingletonSet<T>

- Type Parameters:
    `T` - the type of the member
  All Implemented Interfaces:
    Iterable<T>, Collection<T>, Set<T>

      public class SingletonSet<T>
      extends AbstractSet<T>

  A set with exactly one (non-null) member

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SingletonSet(T e)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `contains(Object o)`
    `Iterator<T>` | `iterator()`
    `int` | `size()`

    - ### Methods inherited from class java.util.AbstractSet

      `equals, hashCode, removeAll`

    - ### Methods inherited from class java.util.AbstractCollection

      `add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Set

      `add, addAll, clear, containsAll, isEmpty, remove, retainAll, toArray, toArray`

- - ### Constructor Detail

    - #### SingletonSet

          public SingletonSet(T e)

  - ### Method Detail

    - #### iterator

          public Iterator<T> iterator()

      Specified by:
        `iterator` in interface `Iterable<T>`
      Specified by:
        `iterator` in interface `Collection<T>`
      Specified by:
        `iterator` in interface `Set<T>`
      Specified by:
        `iterator` in class `AbstractCollection<T>`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<T>`
      Specified by:
        `size` in interface `Set<T>`
      Specified by:
        `size` in class `AbstractCollection<T>`

    - #### contains

          public boolean contains(Object o)

      Specified by:
        `contains` in interface `Collection<T>`
      Specified by:
        `contains` in interface `Set<T>`
      Overrides:
        `contains` in class `AbstractCollection<T>`

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.