Java tutorial
/* * Copyright (c) 2016 acmi * * 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 acmi.l2.clientmod.l2smr.model; import com.fasterxml.jackson.annotation.JsonInclude; import java.util.List; import java.util.Objects; @JsonInclude(JsonInclude.Include.NON_NULL) public class L2Map { private float x, y, z; private List<Actor> staticMeshes; public L2Map() { } public L2Map(float x, float y, float z, List<Actor> staticMeshes) { this.x = x; this.y = y; this.z = z; this.staticMeshes = staticMeshes; } public float getX() { return x; } public void setX(float x) { this.x = x; } public float getY() { return y; } public void setY(float y) { this.y = y; } public float getZ() { return z; } public void setZ(float z) { this.z = z; } public List<Actor> getStaticMeshes() { return staticMeshes; } public void setStaticMeshes(List<Actor> staticMeshes) { this.staticMeshes = staticMeshes; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; L2Map map = (L2Map) o; return Float.compare(map.x, x) == 0 && Float.compare(map.y, y) == 0 && Float.compare(map.z, z) == 0 && Objects.equals(staticMeshes, map.staticMeshes); } @Override public int hashCode() { return Objects.hash(x, y, z, staticMeshes); } }