Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.able.rules
Class AbleOclOrderedSet

    java.lang.Object
      java.util.AbstractCollection
          com.ibm.able.rules.AbleOclCollection
              com.ibm.able.rules.AbleOclOrderedSet

All Implemented Interfaces:
  java.util.Collection, java.io.Serializable

public class AbleOclOrderedSet
extends AbleOclCollection
implements java.io.Serializable

This class defines an OCL OrderedSet. The underlying implementation is built on java.util.LinkedHashSet and its methods, if any, are surfaced as well.

See Also:
  Serialized Form

Field Summary

Fields inherited from class com.ibm.able.rules.AbleOclCollection
`myCollection`

Constructor Summary
`AbleOclOrderedSet()` Create a new, empty OrderedSet.
`AbleOclOrderedSet(AbleOclCollection theAbleOclCollection)` Create a new OrderedSet based on the specified OCL collection.
`AbleOclOrderedSet(java.util.Collection theCollection)` Create a new OrderedSet based on the specified Java collection.

Method Summary
`AbleOclCollection` | `append(java.lang.Object theObject)` Returns a new collection that is this collection with the specified object added at the end.
`java.lang.Object` | `at(int thePosition)` Returns the element at the specified location.
`java.lang.Object` | `clone()`
`AbleOclSet` | `difference(AbleOclSet theSet)` Returns a new Set that is the difference of this Set and the specified Set.
`boolean` | `eq(java.lang.Object theObject)`
`boolean` | `equals(java.lang.Object theObject)`
`AbleOclCollection` | `excluding(java.lang.Object theObject)` Returns a new collection comprised of this collection with the specified object removed.
`java.lang.Object` | `first()` Returns the first element of the collection.
`AbleOclCollection` | `flatten()` Flattens the elements of this collection.
`int` | `hashCode()`
`AbleOclCollection` | `including(java.lang.Object theObject)` Returns a new collection comprised of this collection and the specified object.
`int` | `indexOf(java.lang.Object theObject)` Returns the position of the specified element.
`AbleOclCollection` | `insertAt(int thePosition, java.lang.Object theObject)` Returns a new collection that is this collection with the specified object inserted at the specified location.
`AbleOclCollection` | `intersection(AbleOclBag theBag)` Returns a new collection that is the intersection of this collection and the specified Bag.
`AbleOclSet` | `intersection(AbleOclSet theSet)` Returns a new collection that is the intersection of this collection and the specified Set.
`java.lang.Object` | `last()` Returns the last element of the collection.
`AbleOclCollection` | `prepend(java.lang.Object theObject)` Returns a new collection that is this collection with the specified object added at the beginning.
`void` | `setCollection(java.util.Collection theCollection)` Sets the value of the underlying collection to be the specified collection.
`AbleOclOrderedSet` | `subOrderedSet(int theFirstPosition, int theLastPosition)` Returns a new OrderedSet that is a portion of this OrderedSet.
`AbleOclSet` | `symmetricDifference(AbleOclSet theSet)` Returns a new Set that is the symmetric difference of this Set and the specified Set.
`AbleOclBag` | `union(AbleOclBag theBag)` Returns a new collection that is the union of this collection and the specified Bag.
`AbleOclCollection` | `union(AbleOclSet theSet)` Returns a new collection that is the union of this collection and the specified Set.

Methods inherited from class com.ibm.able.rules.AbleOclCollection
`add, addAll, any, asBag, asOrderedSet, asSequence, asSet, clear, collect, contains, containsAll, count, excludes, excludesAll, exists, flatten, forAll, getCollection, hasAtLeast, hasAtMost, hasBetween, hasExactly, includes, includesAll, intersection, isEmpty, isUnique, iterator, notEmpty, one, product, reject, remove, removeAll, retainAll, select, size, subSequence, sum, toArray, toArray, union`

Methods inherited from class java.util.AbstractCollection
`toString`

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

Constructor Detail

### AbleOclOrderedSet

    public AbleOclOrderedSet()

  Create a new, empty OrderedSet.

### AbleOclOrderedSet

    public AbleOclOrderedSet(java.util.Collection theCollection)

  Create a new OrderedSet based on the specified Java collection.

Parameters:
  `theCollection` - A collection on which to base the new OrderedSet.

### AbleOclOrderedSet

    public AbleOclOrderedSet(AbleOclCollection theAbleOclCollection)

  Create a new OrderedSet based on the specified OCL collection.

Parameters:
  `theAbleOclCollection` - A collection on which to base the new OrderedSet.

Method Detail

### flatten

    public AbleOclCollection flatten()

  Description copied from class: `AbleOclCollection`
  Flattens the elements of this collection.

  Overrides:
    `flatten` in class `AbleOclCollection`
  Returns:
    If the elements of this collection are not themselves collections, this collection itself is returned. If the elements are collections, the returned value is a new collection containing all the elements of all the subcollections.

### including

    public AbleOclCollection including(java.lang.Object theObject)

  Description copied from class: `AbleOclCollection`
  Returns a new collection comprised of this collection and the specified object.

  Overrides:
    `including` in class `AbleOclCollection`
  Parameters:
    `theObject` - An element to add to the new collection.

  Returns:
    a new collection comprised of this collection and the specified object.

### excluding

    public AbleOclCollection excluding(java.lang.Object theObject)

  Description copied from class: `AbleOclCollection`
  Returns a new collection comprised of this collection with the specified object removed.

  Overrides:
    `excluding` in class `AbleOclCollection`
  Parameters:
    `theObject` - An element to remove from the new collection.

  Returns:
    a new collection comprised of this collection with the specified object removed.

### intersection

    public AbleOclCollection intersection(AbleOclBag theBag)

  Description copied from class: `AbleOclCollection`
  Returns a new collection that is the intersection of this collection and the specified Bag.

  Overrides:
    `intersection` in class `AbleOclCollection`
  Parameters:
    `theBag` - A collection to examine with this collection.

  Returns:
    a Bag if this collection is a Bag; a Set if this collection is a Set.

### intersection

    public AbleOclSet intersection(AbleOclSet theSet)

  Description copied from class: `AbleOclCollection`
  Returns a new collection that is the intersection of this collection and the specified Set.

  Overrides:
    `intersection` in class `AbleOclCollection`
  Parameters:
    `theSet` - A collection to examine with this collection.

  Returns:
    a new Set that is the intersection of this collection and the specified Set.

### union

    public AbleOclBag union(AbleOclBag theBag)

  Description copied from class: `AbleOclCollection`
  Returns a new collection that is the union of this collection and the specified Bag.

  Overrides:
    `union` in class `AbleOclCollection`
  Parameters:
    `theBag` - A collection to examine with this collection.

  Returns:
    a new Bag that is the union of this collection and the specified Bag.

### union

    public AbleOclCollection union(AbleOclSet theSet)

  Description copied from class: `AbleOclCollection`
  Returns a new collection that is the union of this collection and the specified Set.

  Overrides:
    `union` in class `AbleOclCollection`
  Parameters:
    `theSet` - A collection to examine with this collection.

  Returns:
    If this collection is a Bag, a new Bag that is the union of this collection and the specified Set. If this collection is a Set, a new Set that is the union of this collection and the specified Set.

### difference

    public AbleOclSet difference(AbleOclSet theSet)

  Description copied from class: `AbleOclCollection`
  Returns a new Set that is the difference of this Set and the specified Set.

  Overrides:
    `difference` in class `AbleOclCollection`
  Parameters:
    `theSet` - A Set to examine with this Set.

  Returns:
    a new Set that is the difference of this Set and the specified Set.

### symmetricDifference

    public AbleOclSet symmetricDifference(AbleOclSet theSet)

  Description copied from class: `AbleOclCollection`
  Returns a new Set that is the symmetric difference of this Set and the specified Set.

  Overrides:
    `symmetricDifference` in class `AbleOclCollection`
  Parameters:
    `theSet` - A Set to examine with this Set.

  Returns:
    a new Set that is the symmetric difference of this Set and the specified Set.

### append

    public AbleOclCollection append(java.lang.Object theObject)

  Description copied from class: `AbleOclCollection`
  Returns a new collection that is this collection with the specified object added at the end.

  Overrides:
    `append` in class `AbleOclCollection`
  Parameters:
    `theObject` - An element to add to the end of the new collection.

  Returns:
    A new collection that is this collection with the specified element added at the end.

### prepend

    public AbleOclCollection prepend(java.lang.Object theObject)

  Description copied from class: `AbleOclCollection`
  Returns a new collection that is this collection with the specified object added at the beginning.

  Overrides:
    `prepend` in class `AbleOclCollection`
  Parameters:
    `theObject` - An element to add to the beginning of the new collection.

  Returns:
    A new collection that is this collection with the specified element added at the beginning.

### insertAt

    public AbleOclCollection insertAt(int thePosition,
                                      java.lang.Object theObject)

  Description copied from class: `AbleOclCollection`
  Returns a new collection that is this collection with the specified object inserted at the specified location.

  Overrides:
    `insertAt` in class `AbleOclCollection`
  Parameters:
    `thePosition` - The location at which to insert the specified element.

    `theObject` - An element to insert in the new collection.

  Returns:
    A new collection that is this collection with the specified element inserted at the specified location.

### at

    public java.lang.Object at(int thePosition)

  Description copied from class: `AbleOclCollection`
  Returns the element at the specified location.

  Overrides:
    `at` in class `AbleOclCollection`
  Parameters:
    `thePosition` - The location of the element to return.

  Returns:
    The element at the specified location.

### first

    public java.lang.Object first()

  Description copied from class: `AbleOclCollection`
  Returns the first element of the collection.

  Overrides:
    `first` in class `AbleOclCollection`
  Returns:
    The first element of the collection.

### indexOf

    public int indexOf(java.lang.Object theObject)

  Description copied from class: `AbleOclCollection`
  Returns the position of the specified element.

  Overrides:
    `indexOf` in class `AbleOclCollection`
  Parameters:
    `theObject` - The element for which to search.

  Returns:
    The position of the specified element.

### last

    public java.lang.Object last()

  Description copied from class: `AbleOclCollection`
  Returns the last element of the collection.

  Overrides:
    `last` in class `AbleOclCollection`
  Returns:
    The last element of the collection.

### subOrderedSet

    public AbleOclOrderedSet subOrderedSet(int theFirstPosition,
                                           int theLastPosition)

  Description copied from class: `AbleOclCollection`
  Returns a new OrderedSet that is a portion of this OrderedSet.

  Overrides:
    `subOrderedSet` in class `AbleOclCollection`
  Parameters:
    `theFirstPosition` - The position of the first element to include.

    `theLastPosition` - The position of the last element to include.

  Returns:
    A new OrderedSet that is a subset of this OrderedSet.

### setCollection

    public void setCollection(java.util.Collection theCollection)

  Description copied from class: `AbleOclCollection`
  Sets the value of the underlying collection to be the specified collection. Use this method only when the null argument constructor has been used to create this collection. (This in itself is discouraged, but since AbleOclCollection can function as a sort of generic Java Collection, the operation isn't forbidden; that is, the constructors are purposely 'public' rather than 'protected'.)

  Overrides:
    `setCollection` in class `AbleOclCollection`
  Parameters:
    `theCollection` - The collection that is to be the value of this collection.

### eq

    public boolean eq(java.lang.Object theObject)

### equals

    public boolean equals(java.lang.Object theObject)

  Specified by:
    `equals` in interface `java.util.Collection`

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `java.util.Collection`

### clone

    public java.lang.Object clone()

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005