public short addIntegerEntry(int entry) { if (integerLocations.containsKey(entry)) { return integerLocations.get(entry); } final short index = count++; constPoolSize++; entries.put(index, new IntegerEntry(entry)); integerLocations.put(entry, index); return index; }
public Integer addIntegerEntry(int entry) { if (integerLocations.containsKey(entry)) { return integerLocations.get(entry); } final Integer index = count++; constPoolSize++; entries.put(index, new IntegerEntry(entry)); integerLocations.put(entry, index); return index; }
public Integer addIntegerEntry(int entry) { if (integerLocations.containsKey(entry)) { return integerLocations.get(entry); } final Integer index = count++; constPoolSize++; entries.put(index, new IntegerEntry(entry)); integerLocations.put(entry, index); return index; }
public Integer addIntegerEntry(int entry) { if (integerLocations.containsKey(entry)) { return integerLocations.get(entry); } final Integer index = count++; constPoolSize++; entries.put(index, new IntegerEntry(entry)); integerLocations.put(entry, index); return index; }
public Integer addIntegerEntry(int entry) { if (integerLocations.containsKey(entry)) { return integerLocations.get(entry); } final Integer index = count++; constPoolSize++; entries.put(index, new IntegerEntry(entry)); integerLocations.put(entry, index); return index; }
public <TEntry extends Entry<?>> TEntry createEntry(Class<TEntry> type, String folder) { if (StringEntry.class.equals(type)) { return type.cast(new StringEntry(folder)); } else if (IntegerEntry.class.equals(type)) { return type.cast(new IntegerEntry(folder)); } throw new IllegalArgumentException("Unknown type: " + type); }
public <T, TEntry extends Entry<T>> List<TEntry> createEntries(Class<TEntry> type) throws ZipException { List<TEntry> entries = new ArrayList<TEntry>(); List<String> paths = new ArrayList<String>();//getPaths(type); for (String path : paths) { entries.add(createEntry(type, path)); } return entries; } public <T, TEntry extends Entry<T>> TEntry createEntry(Class<TEntry> type, String folder) { if (StringEntry.class.equals(type)) { return type.cast(new StringEntry(folder)); } else if (IntegerEntry.class.equals(type)) { return type.cast(new IntegerEntry(folder)); } throw new IllegalArgumentException("Unknown type: " + type); } }