Overview | Package | Class | Tree | Deprecated | Index | Help
| bea Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## theory.smart.ebusiness.shoppingadvisor
Interface Suggestions

All Known Implementing Classes:
  SuggestionsImpl

public interface Suggestions
extends Belonging

This is the list of matching items scored by how well they match.

                      suggestion (Array)
     [Suggestions] <*>------> [theory.smart.ebusiness.shoppingadvisor.Suggestion]
                         0..*

See Also:
  `SuggestionsHome`, `SuggestionsImpl`

Method Summary
`void` | `addSuggestion(int index, Suggestion suggestion)` Inserts the specified suggestion at the specified position in the suggestion list.
`boolean` | `addSuggestion(Suggestion suggestion)` Appends the specified suggestion to the end of the suggestion list.
`boolean` | `addSuggestions(com.sun.java.util.collections.ArrayList suggestions)` Appends all of the suggestions in the specified collection to the end of the suggestion list, in the order that they are returned by the specified collection's iterator.
`boolean` | `addSuggestions(int index, com.sun.java.util.collections.ArrayList suggestions)` Inserts all of the suggestions in the specified collection into this list, starting at the specified position.
`void` | `applyItemByDegree(ItemByDegree ibd)` Apply an Item by degree to the list.
`void` | `applyItemByDegree(ItemByDegree ibd, boolean addNewItems)` Apply an Item by degree to the list.
`boolean` | `containsSuggestion(Suggestion suggestion)` Returns `true` if the suggestion list contains the specified element.
`int` | `getNumberOfSuggestions()` Returns the number of suggestions in the suggestion list.
`Suggestion` | `getSuggestion(int index)` Returns the suggestion at the specified position in the suggestion list.
`com.sun.java.util.collections.ArrayList` | `getSuggestions()` Returns all of the suggestions in the suggestion list.
`com.sun.java.util.collections.ArrayList` | `getSuggestions(int fromIndex, int toIndex)` Returns a view of the portion of the suggestion list between `fromIndex`, inclusive, and `toIndex`, exclusive.
`int` | `indexOfSuggestion(Suggestion suggestion)` Returns the index in the suggestion list of the first occurrence of the specified element, or -1 if the suggestion list does not contain this element.
`boolean` | `isSuggestionsEmtpy()` Returns `true` if the suggestion list contains no suggestions.
`int` | `lastIndexOfSuggestion(Suggestion suggestion)` Returns the index in the suggestion list of the last occurrence of the specified element, or -1 if the suggestion list does not contain this element.
`void` | `orderByItem()` Order the list by the item key so that it can be more quickly searched.
`void` | `orderByScore()` Order the suggestions by the degree to which they match the request.
`void` | `removeAllSuggestions()` Removes all of the suggestions from the suggestion list.
`Suggestion` | `removeSuggestion(int index)` Removes the suggestion at the specified position in the suggestion list.
`boolean` | `removeSuggestion(Suggestion suggestion)` Removes the first occurrence of the specified suggestion in the suggestion list.
`Suggestion` | `setSuggestion(int index, Suggestion suggestion)` Replaces the suggestion at the specified position in the suggestion list with the specified element.
`void` | `trim(int count)` Trim the count of suggestions to the specified length.

Methods inherited from interface theory.smart.foundation.Belonging
`equals, value`

Methods inherited from interface com.sun.java.util.collections.Comparable
`compareTo`

Method Detail

### addSuggestion

    public void addSuggestion(int index,
                              Suggestion suggestion)

  Inserts the specified suggestion at the specified position in the suggestion list. Shifts the suggestion currently at that position (if any) and any subsequent suggestions to the right (adds one to their indices).
  Parameters:
    `index` - index at which the specified suggestion is to be inserted.
    `suggestion` - suggestion to be inserted.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index > size()`).

### addSuggestion

    public boolean addSuggestion(Suggestion suggestion)

  Appends the specified suggestion to the end of the suggestion list.
  Parameters:
    `suggestion` - suggestion to be appended to the suggestion list.
  Returns:
    `true` (as per the general contract of `Collection.add`).

### addSuggestions

    public boolean addSuggestions(int index,
                                  com.sun.java.util.collections.ArrayList suggestions)

  Inserts all of the suggestions in the specified collection into this list, starting at the specified position. Shifts the element currently at that position (if any) and any subsequent suggestions to the right (increases their indices). The new suggestions will appear in the suggestion list in the order that they are returned by the specified collection's iterator.
  Parameters:
    `index` - index at which to insert first element from the specified collection.
    `suggestions` - suggestions to be inserted into the suggestion list.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index > size()`).

### addSuggestions

    public boolean addSuggestions(com.sun.java.util.collections.ArrayList suggestions)

  Appends all of the suggestions in the specified collection to the end of the suggestion list, in the order that they are returned by the specified collection's iterator. The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified Collection is the suggestion list, and the suggestion list is nonempty.)
  Parameters:
    `suggestions` - suggestions to be inserted into the suggestion list.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index > size()`).

### containsSuggestion

    public boolean containsSuggestion(Suggestion suggestion)

  Returns `true` if the suggestion list contains the specified element. More formally, returns `true` if and only if the suggestion list contains at least one suggestion `e` such that `(o==null ? e==null : o.equals(e))`.
  Parameters:
    `suggestion` - suggestion whose presence in the suggestion list is to be tested.
  Returns:
    `true` if the suggestion list contains the specified element.

### getSuggestion

    public Suggestion getSuggestion(int index)

  Returns the suggestion at the specified position in the suggestion list.
  Parameters:
    `index` - index of suggestion to return.
  Returns:
    the suggestion at the specified position in the suggestion list.
  Throws:
    IndexOutOfBoundsException - if the specified index is is out of range (`index < 0 || index >= size()`).

### getSuggestions

    public com.sun.java.util.collections.ArrayList getSuggestions(int fromIndex,
                                                                  int toIndex)

  Returns a view of the portion of the suggestion list between `fromIndex`, inclusive, and `toIndex`, exclusive.
  Parameters:
    `fromIndex` - low endpoint (inclusive) of the subList.
    `toKey` - high endpoint (exclusive) of the subList.
  Returns:
    a view of the specified range within the suggestion list.
  Throws:
    IndexOutOfBoundsException - endpoint index value out of range `(fromIndex < 0 || toIndex > size)`
    java.lang.IllegalArgumentException - endpoint indices out of order `(fromIndex > toIndex)`

### getSuggestions

    public com.sun.java.util.collections.ArrayList getSuggestions()

  Returns all of the suggestions in the suggestion list.
  Returns:
    all of the suggestions in the suggestion list.

### getNumberOfSuggestions

    public int getNumberOfSuggestions()

  Returns the number of suggestions in the suggestion list.
  Returns:
    the number of suggestions in the suggestion list.

### indexOfSuggestion

    public int indexOfSuggestion(Suggestion suggestion)

  Returns the index in the suggestion list of the first occurrence of the specified element, or -1 if the suggestion list does not contain this element. More formally, returns the lowest index i such that `(o==null ? get(i)==null : o.equals(get(i)))`, or -1 if there is no such index.
  Parameters:
    `suggestion` - suggestion to search for.
  Returns:
    the index in the suggestion list of the first occurrence of the specified element, or -1 if the suggestion list does not contain this element.

### isSuggestionsEmtpy

    public boolean isSuggestionsEmtpy()

  Returns `true` if the suggestion list contains no suggestions.

  Returns:
    `true` if the suggestion list contains no suggestions.

### lastIndexOfSuggestion

    public int lastIndexOfSuggestion(Suggestion suggestion)

  Returns the index in the suggestion list of the last occurrence of the specified element, or -1 if the suggestion list does not contain this element. More formally, returns the highest index i such that `(o==null ? get(i)==null : o.equals(get(i)))`, or -1 if there is no such index.
  Parameters:
    `suggestion` - suggestion to search for.
  Returns:
    the index in the suggestion list of the last occurrence of the specified element, or -1 if the suggestion list does not contain this element.

### removeAllSuggestions

    public void removeAllSuggestions()

  Removes all of the suggestions from the suggestion list.

### removeSuggestion

    public Suggestion removeSuggestion(int index)

  Removes the suggestion at the specified position in the suggestion list. Shifts any subsequent suggestions to the left (subtracts one from their indices). Returns the suggestion that was removed from the suggestion list.
  Parameters:
    `index` - the index of the suggestion to removed.
  Returns:
    the suggestion previously at the specified position.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index >= size()`).

### removeSuggestion

    public boolean removeSuggestion(Suggestion suggestion)

  Removes the first occurrence of the specified suggestion in the suggestion list. If the suggestion list does not contain the element, it is unchanged. More formally, removes the suggestion with the lowest index `i` such that `(o==null ? get(i)==null : o.equals(get(i)))` (if such an suggestion exists).
  Parameters:
    `suggestion` - suggestion to be removed from the suggestion list, if present.
  Returns:
    `true` if the suggestion list contained the specified element.

### setSuggestion

    public Suggestion setSuggestion(int index,
                                    Suggestion suggestion)

  Replaces the suggestion at the specified position in the suggestion list with the specified element.
  Parameters:
    `index` - index of suggestion to replace.
    `suggestion` - suggestion to be stored at the specified position.
  Returns:
    the suggestion previously at the specified position.
  Throws:
    IndexOutOfBoundsException - if the specified index is out of range (`index < 0 || index >= size()`).

### applyItemByDegree

    public void applyItemByDegree(ItemByDegree ibd)
                           throws java.rmi.RemoteException

  Apply an Item by degree to the list. First check if the item is there. If not it will be added.

### applyItemByDegree

    public void applyItemByDegree(ItemByDegree ibd,
                                  boolean addNewItems)
                           throws java.rmi.RemoteException

  Apply an Item by degree to the list. The addNewItems flag will determine if items that are not on the list are to be added.

### orderByScore

    public void orderByScore()
                      throws java.rmi.RemoteException

  Order the suggestions by the degree to which they match the request.

### orderByItem

    public void orderByItem()
                     throws java.rmi.RemoteException

  Order the list by the item key so that it can be more quickly searched.

### trim

    public void trim(int count)
              throws java.rmi.RemoteException

  Trim the count of suggestions to the specified length.

Overview | Package | Class | Tree | Deprecated | Index | Help
| bea Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

© Copyright 2000 bea Systems, Inc. All rights reserved.