Get the Tile Matrix Set, should only return one or no value

@return tile matrix set
333393
public TileMatrixSet getTileMatrixSet() {
		TileMatrixSet result = null;
		if (tileMatrixSet.size() > 1) {
			// This shouldn't happen with the table name primary key on tile
			// matrix set
			throw new GeoPackageException(
					"Unexpected state. More than one TileMatrixSet has a foreign key to the Contents. Count: "
							+ tileMatrixSet.size());
		} else if (tileMatrixSet.size() == 1) {
			CloseableIterator<TileMatrixSet> iterator = tileMatrixSet
					.closeableIterator();
			try {
				result = iterator.next();
			} finally {
				try {
					iterator.close();
				} catch (IOException e) {
					throw new GeoPackageException(
							"Failed to close the Tile Matrix Set iterator", e);
				}
			}
		}
		return result;
	}
494679
@Override
    public Tile getTile(int x, int y, int zoom)
    {
        return getTile(x, y, zoom, true);
    }
824837
public SetMultimap<A, B> getKeyValueMultimap() {
    SetMultimap<A, B> map = HashMultimap.create();
    for (A key : keySet()) {
      for (B value : getValues(key)) {
        map.put(key, value);
      }
    }
    return map;
  }
1296805
public Set entrySet() {
        if(_entrySet == null) {
            Map piMap = InternalUtils.getPageInputMap(_request);
            ArrayList list = new ArrayList();
            if(piMap != null) {
                Iterator iterator = piMap.keySet().iterator();
                while(iterator.hasNext()) {
                    Object name = iterator.next();
                    Object value = piMap.get(name);
                    list.add(new Entry(name, value));
                }
            }

            _entrySet = new EntrySet((Entry[])list.toArray(new Entry[]{}));
        }

        return _entrySet;
    }
227397
public Matrix getIplus() {
        Matrix Iplus = new Matrix(size, size);
        int i, j;
        for (i = 0; i < size; i++)
            for (j = 0; j < size; j++)
                Iplus.matrix[i][j] = 0d;
        for (i = 1; i < size; i++)
            Iplus.matrix[i - 1][i] = Math.sqrt(J * J + J - (J - i + 1) * (J - i + 1) + (J - i + 1));
        return Iplus;
    }
1349951
public int getTileSetID (String tileSetName)
        throws PersistenceException
    {
        Integer tsid = _map.get(tileSetName);
        if (tsid == null) {
            tsid = Integer.valueOf(++_nextTileSetID);
            _map.put(tileSetName, tsid);
        }
        return tsid.intValue();
    }
146023
private static TileMatrix getTileMatrixAtLengthIndex(
			List<TileMatrix> tileMatrices, int index) {
		return tileMatrices.get(tileMatrices.size() - index - 1);
	}
42936
public INDArray[] asArray() {
        val val = map.values();
        val res = new INDArray[val.size()];
        int cnt = 0;
        for (val v: val)
            res[cnt++] = v;

        return res;
    }
143840
public Circuit getCircuit(Tile tile)
    {
        final Collection<String> neighborGroups = getNeighborGroups(tile);
        final Collection<String> groups = new HashSet<>(neighborGroups);
        final String group = mapGroup.getGroup(tile);
        final Circuit circuit;

        if (groups.size() == 1)
        {
            if (group.equals(groups.iterator().next()))
            {
                circuit = new Circuit(CircuitType.MIDDLE, group, group);
            }
            else
            {
                circuit = new Circuit(CircuitType.BLOCK, group, groups.iterator().next());
            }
        }
        else
        {
            circuit = getCircuitGroups(group, neighborGroups);
        }

        return circuit;
    }
852099
public synchronized Set<String> keySet() {
		if(size == 0) {
			return new HashSet<String>(0);
		} else {
			try {
				XAttributeMap map = deserialize();
				return map.keySet();
			} catch (IOException e) {
				e.printStackTrace();
				return null;
			}
		}
	}
1082497
public final Set<Entry<String, L[]>> getEntries() {
        return (this.map != null)
                ? this.map.entrySet()
                : Collections.<Entry<String, L[]>>emptySet();
    }
10820
function getTilesetByGid(gid) {
         var invalidRange = -1; // clear the gid of all flip/rotation flags

         gid &= TMX_CLEAR_BIT_MASK; // cycle through all tilesets

         for (var i = 0, len = this.tilesets.length; i < len; i++) {
           // return the corresponding tileset if matching
           if (this.tilesets[i].contains(gid)) {
             return this.tilesets[i];
           } // typically indicates a layer with no asset loaded (collision?)


           if (this.tilesets[i].firstgid === this.tilesets[i].lastgid && gid >= this.tilesets[i].firstgid) {
             // store the id if the [firstgid .. lastgid] is invalid
             invalidRange = i;
           }
         } // return the tileset with the invalid range


         if (invalidRange !== -1) {
           return this.tilesets[invalidRange];
         } else {
           throw new Error("no matching tileset found for gid " + gid);
         }
       }
1097390
public Set<V> nonRemovedValues() {
        return map.values().stream().filter(entry -> !entry.removable).map(entry -> entry.val).collect(Collectors.toSet());
    }
712515
public Set<String> getKeySet() {
    final HashSet<String> keySet = new HashSet<>();

    keySet.addAll(localKeySet());

    if (this._parent != null) {
      keySet.addAll(this._parent.getKeySet());
    }

    return keySet;
  }
347831
public function getS()
    {
        for ($i = 0; $i < $this->n; ++$i) {
            for ($j = 0; $j < $this->n; ++$j) {
                $S[$i][$j] = 0.0;
            }
            $S[$i][$i] = $this->s[$i];
        }
        return new Matrix($S);
    }
944161
@Override
    public Set<Entry<String, GroovyRunner>> entrySet() {
        Map<String, GroovyRunner> map = getMap();
        readLock.lock();
        try {
            if (map.isEmpty()) {
                return Collections.emptySet();
            }
            return Collections.unmodifiableSet(new LinkedHashSet<>(map.entrySet()));
        } finally {
            readLock.unlock();
        }
    }
159959
public java.util.List<String> getValueSet() {
        if (valueSet == null) {
            valueSet = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return valueSet;
    }