/
Eldredgo
/
MeshCentralAndroidAgent
Обзор
Документация
Войти
/
Eldredgo
/
MeshCentralAndroidAgent
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
code-scanner-my/src/main/java/com/android/code_scanner_my/Point.java
64 строки
2 KB
nbolobonin
This is a fork of the original MeshCentral Android app, licensed under the Apache 2.0 license.
16 июл 2026, 11:41
16 июл 2026, 11:41
249a3ef
Код
Авторство
О чём код?
/* * MIT License * * Copyright (c) 2017 Yuriy Budiyev [yuriy.budiyev@yandex.ru] * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.android.code_scanner_my; final class Point { private final int mX; private final int mY; public Point(final int x, final int y) { mX = x; mY = y; } public int getX() { return mX; } public int getY() { return mY; } @Override public int hashCode() { return mX ^ ((mY << (Integer.SIZE / 2)) | (mY >>> (Integer.SIZE / 2))); } @Override public boolean equals(final Object obj) { if (obj == this) { return true; } else if (obj instanceof Point) { final Point other = (Point) obj; return mX == other.mX && mY == other.mY; } else { return false; } } @Override public String toString() { return "(" + mX + "; " + mY + ")"; } }