org.eclipse.jgit.errors

## Class AmbiguousObjectException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - org.eclipse.jgit.errors.AmbiguousObjectException

All Implemented Interfaces:
  Serializable

    public class AmbiguousObjectException
    extends IOException

An `AbbreviatedObjectId` cannot be extended.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`AmbiguousObjectException(AbbreviatedObjectId id, Collection<ObjectId> candidates)` Construct a MissingObjectException for the specified object id.

### Method Summary

All Methods Instance Methods Concrete Methods
`AbbreviatedObjectId` `getAbbreviatedObjectId()`
`Collection<ObjectId>` `getCandidates()`

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

### Constructor Detail

#### AmbiguousObjectException

    public AmbiguousObjectException(AbbreviatedObjectId id,
                                    Collection<ObjectId> candidates)

Construct a MissingObjectException for the specified object id. Expected type is reported to simplify tracking down the problem.

Parameters:
  `id` - SHA-1
  `candidates` - the candidate matches returned by the ObjectReader.

### Method Detail

#### getAbbreviatedObjectId

    public AbbreviatedObjectId getAbbreviatedObjectId()

Returns:
  the AbbreviatedObjectId that has more than one result.

#### getCandidates

    public Collection<ObjectId> getCandidates()

Returns:
  the matching candidates (or at least a subset of them).