Package org.bson

Interface FieldNameValidator


  • public interface FieldNameValidator
    A field name validator, for use by BSON writers to validate field names as documents are encoded.
    Since:
    3.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      FieldNameValidator  fieldName)
      Gets a new validator to use for the value of the field with the given name.
      boolean  fieldName)
      Returns true if the field name is valid, false otherwise.
    • Method Detail

      • validate

        boolean validate​( fieldName)
        Returns true if the field name is valid, false otherwise.
        Parameters:
        fieldName - the field name
        Returns:
        true if the field name is valid, false otherwise
      • getValidatorForField

         fieldName)
        Gets a new validator to use for the value of the field with the given name.
        Parameters:
        fieldName - the field name
        Returns:
        a non-null validator