<p>
The valid dimensions for the metric.
</p>

@param dimensions
The valid dimensions for the metric.
@return Returns a reference to this object so that method calls can be chained together.
773759
public ResponseResourceMetricKey withDimensions(java.util.Map<String, String> dimensions) {
        setDimensions(dimensions);
        return this;
    }
130393
public static MetricsLogger getMetricsLogger(final String dimensions) {
        if (MetricsManager.instance != null) {
            final Map<String, String> dimensionsMap = DimensionsUtils.parseDimensions(dimensions);
            if (!dimensionsMap.isEmpty()) {
                dimensionsMap.put("service", MetricsManager.instance.serviceName);
                if (MetricsManager.instance.env.length() > 0) {
                    dimensionsMap.put("env", MetricsManager.instance.env);
                }
                return MetricsManager.instance.metricsLoggers.computeIfAbsent(
                        DimensionsUtils.serializeDimensionsToString(dimensionsMap), key -> new MetricsLogger(dimensionsMap));
            } else {
                throw new IllegalArgumentException("Dimensions must be valid and non-empty");
            }
        }
        return dummyLogger;
    }
1208046
private static Geometry[] convertGeometries(org.geomajas.gwt.client.spatial.geometry.Geometry geometry) {
		if (geometry.isEmpty()) {
			return null;
		}
		Geometry[] geometries = new Geometry[geometry.getNumGeometries()];
		for (int i = 0; i < geometries.length; i++) {
			geometries[i] = toDto(geometry.getGeometryN(i));
		}
		return geometries;
	}
314200
public static Integer getCoordinateDimension(byte[] geom) throws IOException {
        if (geom == null) {
            return null;
        }
        return GeometryMetaData.getMetaDataFromWKB(geom).dimension;
    }
625621
private static <T, G extends T> void generateSetMeasuredDimension(DexMaker dexMaker,
                                                                      TypeId<G> generatedType,
                                                                      TypeId<T> baseType) {
        final String methodName = ViewMethod.SET_MEASURED_DIMENSION.getName();

        final MethodId<T, Void> superMethod = baseType.getMethod(VOID_TYPE, methodName, TypeId.INT,
                TypeId.INT);

        final MethodId<G, Void> callsSuperMethod = generatedType.getMethod(VOID_TYPE,
                ViewMethod.SET_MEASURED_DIMENSION.getInvokeName(), TypeId.INT, TypeId.INT);

        final Code code = dexMaker.declare(callsSuperMethod, PUBLIC);

        final Local<G> localThis = code.getThis(generatedType);
        final Local<Integer> localWidth = code.getParameter(0, TypeId.INT);
        final Local<Integer> localHeight = code.getParameter(1, TypeId.INT);
        code.invokeSuper(superMethod, null, localThis, localWidth, localHeight);
        code.returnVoid();
    }
1011589
public static Dimension readDimension(final DataInput pStream) throws IOException {
        int h = pStream.readShort();
        int v = pStream.readShort();
        return new Dimension(h, v);
    }
745156
public static Dimension dimensionsToFit(Dimension target, Dimension source) {

        // if target width/height is zero then we have no preference for that, so set it to the original value,
        // since it cannot be any larger
        int maxWidth;
        if (target.getX() == 0) {
            maxWidth = source.getX();
        } else {
            maxWidth = target.getX();
        }

        int maxHeight;
        if (target.getY() == 0) {
            maxHeight = source.getY();
        } else {
            maxHeight = target.getY();
        }

        double wscale = maxWidth / (double) source.getX();
        double hscale = maxHeight / (double) source.getY();

        if (wscale < hscale)
            return new Dimension((int) (source.getX() * wscale), (int) (source.getY() * wscale));
        else
            return new Dimension((int) (source.getX() * hscale), (int) (source.getY() * hscale));
    }
1041568
protected static Dimension getSizeViaResize ()
    {
        BufferedReader bin = null;
        try {
            Process proc = Runtime.getRuntime().exec("resize");
            InputStream in = proc.getInputStream();
            bin = new BufferedReader(new InputStreamReader(in));
            Pattern regex = Pattern.compile("([0-9]+)");
            String line;
            int columns = -1, lines = -1;
            while ((line = bin.readLine()) != null) {
                if (line.indexOf("COLUMNS") != -1) {
                    Matcher match = regex.matcher(line);
                    if (match.find()) {
                        columns = safeToInt(match.group());
                    }
                } else if (line.indexOf("LINES") != -1) {
                    Matcher match = regex.matcher(line);
                    if (match.find()) {
                        lines = safeToInt(match.group());
                    }
                }
            }

            if (columns != -1 && lines != -1) {
                return new Dimension(columns, lines);
            }
            return null;

        } catch (PatternSyntaxException pse) {
            return null; // logging a warning here may be annoying
        } catch (SecurityException se) {
            return null; // logging a warning here may be annoying
        } catch (IOException ioe) {
            return null; // logging a warning here may be annoying
        } finally {
            StreamUtil.close(bin);
        }
    }
685464
public ResponsePartitionKey withDimensions(java.util.Map<String, String> dimensions) {
        setDimensions(dimensions);
        return this;
    }
390727
public Enumeration<Point<Object>> values() {
    Vector<Point<Object>>	result;
    Vector<Point<Integer>>	points;
    int			i;

    result = new Vector<Point<Object>>();

    points = listPoints();
    for (i = 0; i < points.size(); i++)
      result.add(getValues(points.get(i)));

    return result.elements();
  }

  /**
   * Returns a string representation of the space.
   *
   * @return		 a string representation
   */
  public String toString() {
    StringBuilder	result;
    int			i;

    result = new StringBuilder(dimensions() + "-dimensional space:");
    for (i = 0; i < dimensions(); i++)
      result.append("\n - " + (i+1) + ". " + getDimension(i));

    return result.toString();
  }
}
171951
public function getDimensions()
    {
        $dimensions = [];

        if (!empty($this->getDimension())) {
            $dimensionId = str_replace('.', '_', $this->getDimension()->getId());
            $dimensions[$dimensionId] = $this->getDimension()->getName();
        }

        if (!empty($this->getSubtableDimension())) {
            $subDimensionId = str_replace('.', '_', $this->getSubtableDimension()->getId());
            $dimensions[$subDimensionId] = $this->getSubtableDimension()->getName();
        }

        if (!empty($this->getThirdLeveltableDimension())) {
            $subDimensionId = str_replace('.', '_', $this->getThirdLeveltableDimension()->getId());
            $dimensions[$subDimensionId] = $this->getThirdLeveltableDimension()->getName();
        }

        return $dimensions;
    }
1282805
public static Vector createVector(int dimension) {
		if (dimension<=0) throw new IllegalArgumentException();
		switch (dimension) {
			case 2: return createVector2();
			case 3: return createVector3();
			case 4: return createVector4();
			default: return new VectorImpl(dimension);
		}
	}
1264576
private Dimension getRequestedDimension() {

    // check for fixed dimensions from media args
    if (mediaArgs.getFixedWidth() > 0 || mediaArgs.getFixedHeight() > 0) {
      return new Dimension(mediaArgs.getFixedWidth(), mediaArgs.getFixedHeight());
    }

    // check for dimensions from mediaformat (evaluate only first media format)
    MediaFormat[] mediaFormats = mediaArgs.getMediaFormats();
    if (mediaFormats != null && mediaFormats.length > 0) {
      Dimension dimension = mediaFormats[0].getMinDimension();
      if (dimension != null) {
        return dimension;
      }
    }

    // fallback to 0/0 - no specific dimension requested
    return new Dimension(0, 0);
  }
1001756
public String getDimensionDescription(int dimension) {
        if (dimension < 0 || dimension >= basisMapping.numDimensions())
            throw new IllegalArgumentException(
                "Invalid dimension: " + dimension);
        return basisMapping.getDimensionDescription(dimension);
    }
891308
public static int getMemberDimension() throws XDocletException
    {
        if (getCurrentField() != null) {
            return getCurrentField().getDimension();
        }
        else if (getCurrentMethod() != null) {
            XMethod method = getCurrentMethod();

            if (MethodTagsHandler.isGetterMethod(method)) {
                return method.getReturnType().getDimension();
            }
            else if (MethodTagsHandler.isSetterMethod(method)) {
                XParameter param = (XParameter)method.getParameters().iterator().next();

                return param.getDimension();
            }
        }
        return 0;
    }
263262
public Dimension getDimension()
    {
        Dimension ret = null;
        try {
            ret = Dimension.get(UUID.fromString(this.dimensionUUID));
        } catch (final CacheReloadException e) {
            Attribute.LOG.error("Catched CacheReloadException", e);
        }
        return ret;
    }
111353
public MetricNameBuilder addDimension(Dimension dimension, boolean permute) throws MetricsNameSyntaxException {
        return addDimension(dimension.getName(), dimension.getValue(), false);
    }