getFromID -> getByID

This commit is contained in:
dfsek
2021-12-25 01:10:49 -07:00
parent dc688e49ce
commit 46e7bd917a
10 changed files with 20 additions and 20 deletions

View File

@@ -46,7 +46,7 @@ public class GenericTemplateSupplierLoader<T> implements TypeLoader<T> {
Map<String, Object> map = (Map<String, Object>) c;
try {
return loader
.load(registry.getFromID(((String) map.get("type")))
.load(registry.getByID(((String) map.get("type")))
.orElseThrow(() -> new LoadException("No such entry: " + map.get("type")))
.get(), new MapConfiguration(map)).get();
} catch(ConfigException e) {

View File

@@ -97,8 +97,8 @@ public class CheckedRegistryImpl<T> implements CheckedRegistry<T> {
}
@Override
public Map<RegistryKey, T> getIDMatches(String id) {
return registry.getIDMatches(id);
public Map<RegistryKey, T> getMatches(String id) {
return registry.getMatches(id);
}
@Override

View File

@@ -84,8 +84,8 @@ public class LockedRegistryImpl<T> implements Registry<T> {
}
@Override
public Map<RegistryKey, T> getIDMatches(String id) {
return registry.getIDMatches(id);
public Map<RegistryKey, T> getMatches(String id) {
return registry.getMatches(id);
}
@Override

View File

@@ -66,9 +66,9 @@ public class OpenRegistryImpl<T> implements OpenRegistry<T> {
@Override
public T load(@NotNull AnnotatedType type, @NotNull Object o, @NotNull ConfigLoader configLoader) throws LoadException {
return getFromID((String) o).orElseThrow(() -> new LoadException("No such " + type.getType().getTypeName() + " matching \"" + o +
"\" was found in this registry. Registry contains items: " +
getItemsFormatted()));
return getByID((String) o).orElseThrow(() -> new LoadException("No such " + type.getType().getTypeName() + " matching \"" + o +
"\" was found in this registry. Registry contains items: " +
getItemsFormatted()));
}
private String getItemsFormatted() {
@@ -144,7 +144,7 @@ public class OpenRegistryImpl<T> implements OpenRegistry<T> {
}
@Override
public Map<RegistryKey, T> getIDMatches(String id) {
public Map<RegistryKey, T> getMatches(String id) {
return objectIDs
.get(id)
.stream()