Java String Length Get lengthField(String propertyName)

Here you can find the source of lengthField(String propertyName)

Description

Creates the name of the Lucene document field which will store the length of a property.

License

Apache License

Parameter

Parameter Description
propertyName the name of the property; may not be null

Return

the name of the length field; never null

Declaration

public static String lengthField(String propertyName) 

Method Source Code

//package com.java2s;
/*/* w  ww  .  jav  a 2  s  .  c om*/
 * ModeShape (http://www.modeshape.org)
 *
 * 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.
 */

public class Main {
    protected static final String LENGTH_PREFIX = ":len:";

    /**
     * Creates the name of the Lucene document field which will store the length of a property.
     *
     * @param propertyName the name of the property; may not be null
     * @return the name of the length field; never {@code null}
     */
    public static String lengthField(String propertyName) {
        return LENGTH_PREFIX + propertyName;
    }
}

Related

  1. lengthCheck(final String str, final int minLength, final int maxLength)
  2. lengthConstToString(int val, int len)
  3. LengthConversionFactor(String OldUnits)
  4. lengthExpandedTabs(String string, int toIdx, int tabWidth)
  5. lengthExpression(final String operand, final long length)
  6. lengthFormat(String str, int maxLength)
  7. lengthIfAllAlpha(String str)
  8. lengthIntegers(String str)
  9. lengthMinusColors(String thisStr)