001: /*
002: *
003: *
004: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
005: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
006: *
007: * This program is free software; you can redistribute it and/or
008: * modify it under the terms of the GNU General Public License version
009: * 2 only, as published by the Free Software Foundation.
010: *
011: * This program is distributed in the hope that it will be useful, but
012: * WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * General Public License version 2 for more details (a copy is
015: * included at /legal/license.txt).
016: *
017: * You should have received a copy of the GNU General Public License
018: * version 2 along with this work; if not, write to the Free Software
019: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA
021: *
022: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
023: * Clara, CA 95054 or visit www.sun.com if you need additional
024: * information or have any questions.
025: */
026: package javax.microedition.location;
027:
028: import java.io.*;
029: import com.sun.j2me.location.LandmarkImpl;
030:
031: /**
032: * This class is defined by the JSR-179 specification
033: * <em>Location API for J2ME for J2ME™.</em>
034: */
035: // JAVADOC COMMENT ELIDED
036: public class Landmark {
037:
038: /** Landmark Implementation */
039: private LandmarkImpl landmark = null;
040:
041: // JAVADOC COMMENT ELIDED
042: public Landmark(String name, String description,
043: QualifiedCoordinates coordinates, AddressInfo addressInfo) {
044: landmark = new LandmarkImpl(name, description, coordinates,
045: addressInfo);
046: }
047:
048: // JAVADOC COMMENT ELIDED
049: public String getName() {
050: return landmark.getName();
051: }
052:
053: // JAVADOC COMMENT ELIDED
054: public String getDescription() {
055: return landmark.getDescription();
056: }
057:
058: // JAVADOC COMMENT ELIDED
059: public QualifiedCoordinates getQualifiedCoordinates() {
060: return landmark.getQualifiedCoordinates();
061: }
062:
063: // JAVADOC COMMENT ELIDED
064: public AddressInfo getAddressInfo() {
065: return landmark.getAddressInfo();
066: }
067:
068: // JAVADOC COMMENT ELIDED
069: public void setName(String name) {
070: if (name == null) {
071: throw new NullPointerException();
072: }
073: landmark.setName(name);
074: }
075:
076: // JAVADOC COMMENT ELIDED
077: public void setDescription(String description) {
078: landmark.setDescription(description);
079: }
080:
081: // JAVADOC COMMENT ELIDED
082: public void setQualifiedCoordinates(QualifiedCoordinates coordinates) {
083: landmark.setQualifiedCoordinates(coordinates);
084: }
085:
086: // JAVADOC COMMENT ELIDED
087: public void setAddressInfo(AddressInfo addressInfo) {
088: landmark.setAddressInfo(addressInfo);
089: }
090:
091: // JAVADOC COMMENT ELIDED
092: Landmark(LandmarkImpl landmark) {
093: this .landmark = landmark;
094: }
095:
096: // JAVADOC COMMENT ELIDED
097: LandmarkImpl getInstance() {
098: return landmark;
099: }
100: }
|