<commit_before>/*
 * Copyright 2010-2013 WorldWide Conferencing, LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.liftweb
package mongodb
package record
package field

import java.util.Date

import scala.collection.JavaConversions._
import scala.xml.NodeSeq

import common.{Box, Empty, Failure, Full}
import json.JsonAST._
import json.JsonParser
import http.SHtml
import http.js.JE.{JsNull, JsRaw}
import net.liftweb.record.{Field, FieldHelpers, MandatoryTypedField, Record}
import util.Helpers._

import com.mongodb._
import org.bson.types.ObjectId

/**
  * List field. Compatible with most object types,
  * including Pattern, ObjectId, Date, and UUID.
  *
  * Note: setting optional_? = false will result in incorrect equals behavior when using setFromJValue
  */<commit_msg>Documented the types that MongoListField supports.<commit_after>/*
 * Copyright 2010-2013 WorldWide Conferencing, LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.liftweb
package mongodb
package record
package field

import java.util.Date

import scala.collection.JavaConversions._
import scala.xml.NodeSeq

import common.{Box, Empty, Failure, Full}
import json.JsonAST._
import json.JsonParser
import http.SHtml
import http.js.JE.{JsNull, JsRaw}
import net.liftweb.record.{Field, FieldHelpers, MandatoryTypedField, Record}
import util.Helpers._

import com.mongodb._
import org.bson.types.ObjectId

/**
  * List field.
  *
  * Supported types:
  * primitives - String, Int, Long, Double, Float, Byte, BigInt,
  * Boolean (and their Java equivalents)
  * date types - java.util.Date, Calendar, org.joda.time.DateTime
  * mongo types - ObjectId, Pattern, UUID
  *
  * If you need to support other types, you will need to override the
  * asDBObject and setFromDBObject functions accordingly. And the
  * asJValue and setFromJValue functions if you will be using them.
  *
  * Note: setting optional_? = false will result in incorrect equals behavior when using setFromJValue
  */
{'fraction_non_alphanumeric': 0.07824933687002653, 'fraction_numerical': 0.007957559681697613, 'mean_word_length': 4.148464163822526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1094628', 'n_tokens_mistral': 870, 'n_tokens_neox': 838, 'n_words': 347}