Standardize and update all copyright statements to name "ZXing authors" as suggested...
[zxing.git] / core / src / com / google / zxing / common / GenericResultPoint.java
1 /*
2  * Copyright 2008 ZXing authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package com.google.zxing.common;
18
19 import com.google.zxing.ResultPoint;
20
21 /**
22  * <p>Simple implementation of {@link ResultPoint} for applications that don't need
23  * to use anything more complex.</p>
24  *
25  * @author dswitkin@google.com (Daniel Switkin)
26  */
27 public final class GenericResultPoint implements ResultPoint {
28
29   private final float posX;
30   private final float posY;
31
32   public GenericResultPoint(float posX, float posY) {
33     this.posX = posX;
34     this.posY = posY;
35   }
36
37   public float getX() {
38     return posX;
39   }
40
41   public float getY() {
42     return posY;
43   }
44
45   public String toString() {
46     StringBuffer result = new StringBuffer();
47     result.append('(');
48     result.append(posX);
49     result.append(',');
50     result.append(posY);
51     result.append(')');
52     return result.toString();
53   }
54
55 }