V - The value type.public class CoordinateMap<V> extends MapView<Coordinate,V> implements SortedMap<Coordinate,V>, TableModel
Coordinate Map implementation.MapView.EntrySetAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
CoordinateMap()
Constructor to create an empty
CoordinateMap. |
CoordinateMap(Number yN,
Number xN)
Constructor to specify maximum
Y and X (origin
(0, 0)). |
CoordinateMap(Number y0,
Number x0,
Number yN,
Number xN)
Constructor to specify minimum and maximum
Y and X. |
clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, size, toString, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, containsValue, equals, forEach, get, getOrDefault, hashCode, isEmpty, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, sizepublic CoordinateMap()
CoordinateMap.public CoordinateMap(Number y0, Number x0, Number yN, Number xN)
Y and X.y0 - MIN(y)x0 - MIN(x)yN - MAX(y) + 1xN - MAX(x) + 1public CoordinateMap(Number yN, Number xN)
Y and X (origin
(0, 0)).yN - MAX(y) + 1xN - MAX(x) + 1protected SortedMap<Coordinate,V> map()
map in class MapView<Coordinate,V>Map.protected Type getType()
this CoordinateMap.Class.public CoordinateMap<V> resize(Number y0, Number x0, Number yN, Number xN)
CoordinateMap.y0 - MIN(y)x0 - MIN(x)yN - MAX(y) + 1xN - MAX(x) + 1this CoordinateMap.public CoordinateMap<V> resize(Number yN, Number xN)
CoordinateMap with
[y0, x0] = [0, 0].yN - MAX(y) + 1xN - MAX(x) + 1this CoordinateMap.public Coordinate getMin()
public Coordinate getMax()
public int getMinY()
public int getMinX()
public int getMaxY()
public int getMaxX()
public boolean includes(Coordinate coordinate)
Coordinate is included in
this CoordinateMap's space. Because the map is
sparse, this method may return true when
AbstractMap.containsKey(Object) returns false.coordinate - The Coordinate.true if within the space; false otherwise.public List<CoordinateMap<V>> columns()
List of columns
(see column(Number)).List of columns.public List<CoordinateMap<V>> rows()
List of rows (see row(Number)).List of rows.public CoordinateMap<V> column(Number x)
List representing the specified column
backed by the CoordinateMap.x - The X-coordinate.CoordinateMap representing the column.public CoordinateMap<V> row(Number y)
List representing the specified row backed
by the CoordinateMap.y - The Y-coordinate.CoordinateMap representing the row.public CoordinateMap<V> subMap(Number y0, Number x0, Number yN, Number xN)
y0 - MIN(y)x0 - MIN(x)yN - MAX(y) + 1xN - MAX(x) + 1Map (CoordinateMap).public List<V> asList()
this CoordinateMap values as a
List. Updates made through List.set(int,Object) will
be made to this CoordinateMap.List of CoordinateMap values.public boolean containsKey(Number y, Number x)
y - The Y-coordinate.x - The X-coordinate.true if the CoordinateMap contains a key
with the specified Coordinate; false
otherwise.public V get(Number y, Number x)
MapView.get(Object).y - The Y-coordinate.x - The X-coordinate.null).public V put(Number y, Number x, V value)
y - The Y-coordinate.x - The X-coordinate.value - The value at the coordinate.public V put(Coordinate key, V value)
put in interface Map<Coordinate,V>put in class MapView<Coordinate,V>public V remove(Object key)
remove in interface Map<Coordinate,V>remove in class MapView<Coordinate,V>public Comparator<? super Coordinate> comparator()
comparator in interface SortedMap<Coordinate,V>public CoordinateMap<V> subMap(Coordinate from, Coordinate to)
subMap in interface SortedMap<Coordinate,V>public CoordinateMap<V> headMap(Coordinate key)
headMap in interface SortedMap<Coordinate,V>public CoordinateMap<V> tailMap(Coordinate key)
tailMap in interface SortedMap<Coordinate,V>public Coordinate firstKey()
firstKey in interface SortedMap<Coordinate,V>public Coordinate lastKey()
lastKey in interface SortedMap<Coordinate,V>public void clear()
clear in interface Map<Coordinate,V>clear in class MapView<Coordinate,V>public int getRowCount()
getRowCount in interface TableModelpublic int getColumnCount()
getColumnCount in interface TableModelpublic String getColumnName(int x)
getColumnName in interface TableModelpublic Class<? extends V> getColumnClass(int x)
getColumnClass in interface TableModelpublic boolean isCellEditable(int y, int x)
isCellEditable in interface TableModelpublic V getValueAt(int y, int x)
getValueAt in interface TableModelpublic void setValueAt(Object value, int y, int x)
setValueAt in interface TableModelpublic void addTableModelListener(TableModelListener listener)
addTableModelListener in interface TableModelpublic void removeTableModelListener(TableModelListener listener)
removeTableModelListener in interface TableModelprotected TableModelListener[] getTableModelListeners()
protected void fireTableDataChanged()
protected void fireTableStructureChanged()
protected void fireTableRowsInserted(int start, int end)
protected void fireTableRowsUpdated(int start, int end)
protected void fireTableRowsDeleted(int start, int end)
protected void fireTableCellUpdated(int row, int column)
protected void fireTableChanged(TableModelEvent event)
Copyright © 2015–2021. All rights reserved.