Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright (c) 2013, Francis Galiegue <fgaliegue@gmail.com>
   *
   * This program is free software: you can redistribute it and/or modify
   * it under the terms of the Lesser GNU General Public License as
   * published by the Free Software Foundation, either version 3 of the
   * License, or (at your option) any later version.
   *
   * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * Lesser GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 package com.github.fge.jsonschema.library;
 
 
 
 public final class Library
     implements Frozen<LibraryBuilder>
 {
    
Dictionary of syntax checkers
 
     final Dictionary<SyntaxCheckersyntaxCheckers;

    
Dictionary of digesters
 
     final Dictionary<Digesterdigesters;

    
Dictionary of keyword validator constructors
 
     final Dictionary<Constructor<? extends KeywordValidator>> validators;

    
Dictionary of format attributes
 
     final Dictionary<FormatAttributeformatAttributes;

    
Create a new, empty library builder

Returns:
a LibraryBuilder
 
     public static LibraryBuilder newBuilder()
     {
         return new LibraryBuilder();
     }

    
Constructor from a library builder

Parameters:
builder the builder
See also:
LibraryBuilder.freeze()
 
     Library(final LibraryBuilder builder)
     {
          = builder.syntaxCheckers.freeze();
          = builder.digesters.freeze();
          = builder.validators.freeze();
          = builder.formatAttributes.freeze();
     }

    
Internal constructor, do not use!

Parameters:
syntaxCheckers map of syntax checkers
digesters map of digesters
validators map of keyword validator constructors
formatAttributes map of format attributes
 
     Library(final Dictionary<SyntaxCheckersyntaxCheckers,
         final Dictionary<Digesterdigesters,
         final Dictionary<Constructor<? extends KeywordValidator>> validators,
         final Dictionary<FormatAttributeformatAttributes)
     {
        this. = syntaxCheckers;
        this. = digesters;
        this. = validators;
        this. = formatAttributes;
    }

    
Get the dictionary of syntax checkers

Returns:
a dictionary
    {
        return ;
    }

    
Get the dictionary of digesters

Returns:
a dictionary
    public Dictionary<DigestergetDigesters()
    {
        return ;
    }

    
Get the dictionary of keyword validator constructors

Returns:
a dictionary
    public Dictionary<Constructor<? extends KeywordValidator>> getValidators()
    {
        return ;
    }

    
Get the dictionary of format attributes

Returns:
a dictionary
    {
        return ;
    }

    
Create a mutable version of this library

    @Override
    public LibraryBuilder thaw()
    {
        return new LibraryBuilder(this);
    }
New to GrepCode? Check out our FAQ X