<p>
Gets an appropriate rule for the padding required.
</p>

@param field the field to get a rule for
@param padding the padding required
@return a new rule with the correct padding
11030
protected NumberRule selectNumberRule(final int field, final int padding) {
		switch (padding) {
			case 1:
				return new UnpaddedNumberField(field);
			case 2:
				return new TwoDigitNumberField(field);
			default:
				return new PaddedNumberField(field, padding);
		}
	}
994316
public String getValue(final String field)
    {
        FieldValue fieldValue = Iterables.find
        (
            fieldValues,
            new Predicate<FieldValue>()
            {
                @Override
                public boolean apply(FieldValue fv)
                {
                    return fv.getField().equals(field);
                }
            },
            null
        );
        return (fieldValue != null) ? fieldValue.getValue() : null;
    }
747679
public InternalFieldErrorBuilder createFieldError(final String field, final String errorCode) {
        
        return createFieldError(field, new String[]{errorCode});
        
    }
1198612
@Nullable
  public Object get(@Nonnull String field) {
    return get(FieldPath.fromDotSeparatedString(field));
  }
26882
public static String javaRepeatedEnumValueGetterByIndexName(Field field) {
        if (field.isRepeated()) {
            return GETTER_PREFIX + Formatter.toPascalCase(field.getName()) + VALUE;
        }
        throw new IllegalArgumentException(field.toString());
    }
344889
public static boolean isMustFieldValid(String field, String reg) {
        if (field == null || field.length() == 0) {
            return false;
        }
        return Pattern.matches(reg, field);
    }
115935
public static Type forField(Field field) {
		Assert.notNull(field, "Field must not be null");
		return forTypeProvider(new FieldTypeProvider(field));
	}
20004
public CustomField getCustomField(FieldType field)
   {
      CustomField result = m_configMap.get(field);
      if (result == null)
      {
         result = new CustomField(field, this);
         m_configMap.put(field, result);
      }
      return result;
   }
776813
public static <C> PortableFieldAccess<C> get(Field f) {
		
		Class<?> type = (Class<?>) f.getType();
		
		if (type.isPrimitive()) {
			if (java.lang.Boolean.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableBooleanFieldAccess<C>(f);
			} else if (java.lang.Byte.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableByteFieldAccess<C>(f);
			} else if (java.lang.Character.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableCharFieldAccess<C>(f);
			} else if (java.lang.Short.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableShortFieldAccess<C>(f);
			} else if (java.lang.Integer.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableIntFieldAccess<C>(f);
			} else if (java.lang.Long.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableLongFieldAccess<C>(f);
			} else if (java.lang.Float.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableFloatFieldAccess<C>(f);
			} else if (java.lang.Double.TYPE == type) {
				return (PortableFieldAccess<C>) new PortableDoubleFieldAccess<C>(f);
			}
		}
		return new PortableFieldAccess<C>(f);
	}
1349261
public FieldConstraintsBuilder forField(final CronFieldName field) {
        switch (field) {
            case SECOND:
            case MINUTE:
                endRange = 59;
                return this;
            case HOUR:
                endRange = 23;
                return this;
            case DAY_OF_WEEK:
                stringMapping = daysOfWeekMapping();
                endRange = 6;
                return this;
            case DAY_OF_MONTH:
                startRange = 1;
                endRange = 31;
                return this;
            case MONTH:
                stringMapping = monthsMapping();
                startRange = 1;
                endRange = 12;
                return this;
            case DAY_OF_YEAR:
                startRange = 1;
                endRange = 366;
                return this;
            default:
                return this;
        }
    }
1020813
public static Query withStringIgnoreCase(String field, String value) {
        return Query.withString(field, value, true);
    }
1047668
public String getField(String field) {
        HashMap map = fields;
        StringTokenizer tk = new StringTokenizer(field, ".");
        if (!tk.hasMoreTokens())
            return null;
        while (true) {
            String s = tk.nextToken();
            Object obj = map.get(s);
            if (obj == null)
                return null;
            if (tk.hasMoreTokens()) {
                if (obj instanceof HashMap)
                    map = (HashMap)obj;
                else
                    return null;
            }
            else {
                if (obj instanceof HashMap)
                    return null;
                else {
                    if (((PdfObject)obj).isString())
                        return ((PdfString)obj).toUnicodeString();
                    else
                        return PdfName.decodeName(obj.toString());
                }
            }
        }
    }
780034
public ASTField getField(Field field) {
        ASTAccessModifier modifier = ASTAccessModifier.getModifier(field.getModifiers());

        return new ASTClassField(field, getType(field.getType(), field.getGenericType()), modifier, getAnnotations(field));
    }
967838
public static <F extends PField> MappedField<F> withColumn(F field) {
        return new MappedField<>(field.getName(), field);
    }
667107
public void getField(VariableElement field) throws IOException
    {
        if (field.getModifiers().contains(Modifier.STATIC))
        {
            throw new IllegalArgumentException(field+" is static");
        }
        int index = subClass.resolveFieldIndex(field);
        getfield(index);
    }
744890
function(field, rule) {
            var
              $field       = module.get.field(field.identifier),
              type         = rule.type,
              value        = $field.val(),
              isValid      = true,
              ancillary    = module.get.ancillaryValue(rule),
              ruleName     = module.get.ruleName(rule),
              ruleFunction = settings.rules[ruleName]
            ;
            if( !$.isFunction(ruleFunction) ) {
              module.error(error.noRule, ruleName);
              return;
            }
            // cast to string avoiding encoding special values
            value = (value === undefined || value === '' || value === null)
              ? ''
              : $.trim(value + '')
            ;
            return ruleFunction.call($field, value, ancillary);
          }
479245
public static String getMapFieldAddAllName(Field field) {
        if (field.isMap()) {
            return "putAll" + Formatter.toPascalCase(field.getName());
        }
        throw new IllegalArgumentException(field.toString());
    }