Java Number Min Value minCurveSegmentLength(String segmentTypeName)

Here you can find the source of minCurveSegmentLength(String segmentTypeName)

Description

Indicates the minimum number of direct positions required to specify a GML curve segment.

License

Apache License

Parameter

Parameter Description
segmentTypeName The local name of element representing a the curve segment.

Return

An integer value > 0.

Declaration

public static int minCurveSegmentLength(String segmentTypeName) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*  w  w  w . j a va 2 s .  c  o  m*/
     * Indicates the minimum number of direct positions required to specify a
     * GML curve segment. The value depends on the type of curve segment, but
     * falls in the range 1-3.
     * 
     * @param segmentTypeName
     *            The local name of element representing a the curve segment.
     * @return An integer value > 0.
     */
    public static int minCurveSegmentLength(String segmentTypeName) {
        int minLength = 2;
        if (segmentTypeName.endsWith("ByCenterPoint")) {
            minLength = 1;
        } else if (segmentTypeName.equals("ArcString") || segmentTypeName.equals("Arc")
                || segmentTypeName.equals("Circle")) {
            minLength = 3;
        }
        return minLength;
    }
}

Related

  1. minChar(String input)
  2. minCharsForCriteria(final int length, final int criteria)
  3. minCommonMultiple(int m, int n)
  4. minComparable(T first, T second)
  5. minCoverageEstimate(short mask)
  6. minDark(final int colorValue)
  7. minDeg2Bigger(long number)
  8. minDelta(double a, double b)
  9. minDivisibleNumber(float yourDividend, float divisor)