All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.maps.gwt.client.DistanceMatrixElementStatus Maven / Gradle / Ivy

/*
 * Copyright 2011 The Google Web Toolkit Authors.
 *
 * 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.
 */
package com.google.maps.gwt.client;

import com.google.gwt.core.client.JavaScriptObject;
import java.util.HashMap;
import java.util.Map;

/**
 * The element-level status about a particular origin-destination
 * pairing returned by the
 * DistanceMatrixService
 * 
 * upon completion of a distance matrix request.
 *
 * THIS SOURCE CODE IS GENERATED, DO NOT MODIFY
 */
public class DistanceMatrixElementStatus extends JavaScriptObject {

  /**
   * The origin and/or destination of this pairing could not be geocoded.
   */ 
  public static final DistanceMatrixElementStatus NOT_FOUND = getNotFound();

  /**
   * The request was successful.
   */ 
  public static final DistanceMatrixElementStatus OK = getOk();

  /**
   * There are no nearby panoramas.
   */ 
  public static final DistanceMatrixElementStatus ZERO_RESULTS = getZeroResults();

  /**
   * Internal registry for value types.
   */ 
  private static Map registry;

  /**
   * Access the enum instance using the underlying value of the type.
   */ 
  public static final DistanceMatrixElementStatus fromValue(String value){
    return registry.get(value);
  }

  /**
   * Internal initialization method.
   */ 
  private static final native DistanceMatrixElementStatus getNotFound()/*-{
    var instance = { 'value' : $wnd.google.maps.DistanceMatrixElementStatus.NOT_FOUND };
    @com.google.maps.gwt.client.DistanceMatrixElementStatus::register(Lcom/google/maps/gwt/client/DistanceMatrixElementStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal initialization method.
   */ 
  private static final native DistanceMatrixElementStatus getOk()/*-{
    var instance = { 'value' : $wnd.google.maps.DistanceMatrixElementStatus.OK };
    @com.google.maps.gwt.client.DistanceMatrixElementStatus::register(Lcom/google/maps/gwt/client/DistanceMatrixElementStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal initialization method.
   */ 
  private static final native DistanceMatrixElementStatus getZeroResults()/*-{
    var instance = { 'value' : $wnd.google.maps.DistanceMatrixElementStatus.ZERO_RESULTS };
    @com.google.maps.gwt.client.DistanceMatrixElementStatus::register(Lcom/google/maps/gwt/client/DistanceMatrixElementStatus;)(instance);
    return instance;
  }-*/;

  /**
   * Internal registration of type for future access.
   */ 
  private static final void register(DistanceMatrixElementStatus value){
    if (registry == null) {
      registry = new HashMap();
    }
    registry.put(value.getValue(),value);
  }


  /**
   * Protected constructor avoids default public constructor.
   */
  protected DistanceMatrixElementStatus() {
    /* Java constructor is protected, */
  }

  /**
   * Access the underlying value of the type.
   */ 
  public final native String getValue()/*-{
    return this.value;
  }-*/;

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy