public class Island
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Island(PebbleInstance pi) |
Modifier and Type | Method and Description |
---|---|
void |
addVert(Vertex v)
Adds a vertex to the island.
|
void |
addVerts(java.util.List<Vertex> vs)
Adds all the vertices to the island.
|
boolean |
contains(Vertex c) |
boolean |
equals(Island i)
Equals.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<Vertex> |
getAdjacent()
Gets the adjacent verts, not the verts on the island
|
java.util.Collection<Vertex> |
getC2Verts()
Gets the c2 vertices.
|
PebbleInstance |
getPi() |
int |
getSurplus()
Gets the surplus of the island.
|
java.util.List<Vertex> |
getVertexList()
Gets the vertex list of the island.
|
java.util.Set<Vertex> |
getVerts()
Gets the vertices on the island.
|
int |
hashCode() |
boolean |
is22Island()
Checks if this is <2,2>-island.
|
boolean |
is2Island()
Checks if this is 2-island.
|
boolean |
isEmpire()
Checks if this island contains an empire.
|
void |
setPi(PebbleInstance pi) |
java.lang.String |
toString() |
public Island(PebbleInstance pi)
public PebbleInstance getPi()
public void setPi(PebbleInstance pi)
public void addVert(Vertex v)
v
- the vertex to addpublic void addVerts(java.util.List<Vertex> vs)
vs
- the vertices to attempt to add to the islandpublic java.util.Set<Vertex> getVerts()
public java.util.Collection<Vertex> getC2Verts()
public int getSurplus()
public java.util.List<Vertex> getVertexList()
public boolean isEmpire()
public boolean is22Island()
public boolean is2Island()
public boolean equals(Island i)
i
- the ipublic int hashCode()
hashCode
in class java.lang.Object
public java.util.Set<Vertex> getAdjacent()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean contains(Vertex c)
public java.lang.String toString()
toString
in class java.lang.Object