Computes the percentage of the given style among all the style occurences.
@param style the style
@return the style percentage
967207
public double getPercentage(T style)
    {
        int scnt = 0;
        int allcnt = 0;
        for (Map.Entry<T, Integer> entry : getAll().entrySet())
        {
            if (entry.getKey().equals(style))
                scnt = entry.getValue();
            allcnt += entry.getValue();
        }
        return scnt / (double) allcnt;
    }
233817
static public <C, T extends C> Value<C, T> percentWidth (Toolkit<C, T> toolkit, final float percent, final C widget) {
		return new Value<C, T>(toolkit) {
                        @Override
			public float get (Cell<C, T> cell) {
				return toolkit.getWidth(widget) * percent;
			}

                        @Override
			public float get (Object table) {
				return toolkit.getWidth(widget) * percent;
			}
		};
	}
142244
public static boolean setStyle(PolylineOptions polylineOptions, StyleRow style, float density) {

        if (style != null) {

            Color color = style.getColorOrDefault();
            polylineOptions.color(color.getColorWithAlpha());

            double width = style.getWidthOrDefault();
            polylineOptions.width((float) width * density);

        }

        return style != null;
    }
1072758
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setStyle(final String style) {
        pathBuilder.setStyle(style);
        return (T) this;
    }
533869
private Double getPercentage(Number number)
   {
      Double result = null;

      if (number != null)
      {
         result = Double.valueOf(number.doubleValue() / 100);
      }

      return result;
   }
495576
public final void setStyle(@NonNull final Style style) {
        Condition.INSTANCE.ensureNotNull(style, "The style may not be null");
        this.style = style;
        this.rawItems = null;
        notifyDataSetChanged();
    }
369118
public final Optional<? extends Style> getStyle(final String styleName) {
        final String styleRef = this.styles.get(styleName);
        if (styleRef != null) {
            return this.styleParser.loadStyle(this, this.clientHttpRequestFactory, styleRef);
        } else {
            return Optional.empty();
        }


    }
189196
public static Num percentOf(Object percent, Object ofValue) {
        Num _x = new Num(percent);
        Num _y = new Num(ofValue);
        Calculator cPercent = Calculator.builder().openBracket().val(_x).div(100).closeBracket().mul(_y);
        return cPercent.calculate();
    }
409360
def _get_color_size(self, style):
        
        color = "b"
        if "color" in style:
            color = style["color"]
        size = 7
        if "size" in style:
            size = style["size"]
        return color, size
917588
public void add(T style)
    {
        Integer cnt = styles.get(style);
        if (cnt == null)
            styles.put(style, 1);
        else
            styles.put(style, cnt+1);
    }
358913
function getStyle(target, prop, compute) {
		if (compute || (compute == null && s.compute)) {
			return window.getComputedStyle(target)[prop];
		} else {
			return target.style[prop];
		}
	}
856046
private int percent(final long val, final long total) {
        if (total == 0) {
            return 100;
        }

        if (val == 0) {
            return 0;
        }

        double dVal = (double) val;
        double dTotal = (double) total;

        return (int) (dVal / dTotal * 100);
    }
1104770
function(style)
	{
		if (style != null)
		{
			var pairs = style.split(';');
			var stylename = pairs[0];
			
			if (stylename.indexOf('=') < 0)
			{
				return stylename;
			}
		}
				
		return '';
	}
256403
public final static DateFormat getTimeInstance(int style)
    {
        return get(style, 0, 1, Locale.getDefault(Locale.Category.FORMAT));
    }
887711
public int compareTo(InternalFeature o) {
		if (null == o) {
			return -1; // avoid NPE, put null objects at the end
		}
		if (null != styleDefinition && null != o.getStyleInfo()) {
			if (styleDefinition.getIndex() > o.getStyleInfo().getIndex()) {
				return 1;
			}
			if (styleDefinition.getIndex() < o.getStyleInfo().getIndex()) {
				return -1;
			}
		}
		return 0;
	}
807751
static public <C, T extends C> Value<C, T> percentWidth (Toolkit<C, T> toolkit, final float percent) {
		return new TableValue<C, T>(toolkit) {
                        @Override
			public float get (T table) {
				return toolkit.getWidth(table) * percent;
			}
		};
	}
430134
public WikiFormat removeStyle(WikiStyle style)
    {
        if (!fStyles.contains(style)) {
            return this;
        }
        WikiFormat clone = getClone();
        clone.fStyles.remove(style);
        return clone;
    }