Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.validator
Class ISBNValidator

    java.lang.Object
      |
      +--org.apache.commons.validator.ISBNValidator

public class ISBNValidator
extends java.lang.Object

A class for validating 10 digit ISBN codes. Based on this algorithm

Since:
  Validator 1.2.0
Version:
  $Revision: 478334 $ $Date: 2006-11-22 21:31:54 +0000 (Wed, 22 Nov 2006) $

Constructor Summary
`ISBNValidator()` Default Constructor.

Method Summary
`boolean` | `isValid(java.lang.String isbn)` If the ISBN is formatted with space or dash separators its format is validated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ISBNValidator

    public ISBNValidator()

  Default Constructor.

Method Detail

### isValid

    public boolean isValid(java.lang.String isbn)

  If the ISBN is formatted with space or dash separators its format is validated. Then the digits in the number are weighted, summed, and divided by 11 according to the ISBN algorithm. If the result is zero, the ISBN is valid. This method accepts formatted or raw ISBN codes.
  Parameters:
    `isbn` - Candidate ISBN number to be validated. `null` is considered invalid.
  Returns:
    true if the string is a valid ISBN code.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2006 The Apache Software Foundation. All Rights Reserved.