code stringlengths 73 34.1k | label stringclasses 1
value |
|---|---|
public static String getDirectoryname(final String pPath, final char pSeparator) {
int index = pPath.lastIndexOf(pSeparator);
if (index < 0) {
return ""; // Assume only filename
}
return pPath.substring(0, index);
} | java |
public static String getFilename(final String pPath, final char pSeparator) {
int index = pPath.lastIndexOf(pSeparator);
if (index < 0) {
return pPath; // Assume only filename
}
return pPath.substring(index + 1);
} | java |
public static boolean isEmpty(File pFile) {
if (pFile.isDirectory()) {
return (pFile.list().length == 0);
}
return (pFile.length() == 0);
} | java |
public static String getTempDir() {
synchronized (FileUtil.class) {
if (TEMP_DIR == null) {
// Get the 'java.io.tmpdir' property
String tmpDir = System.getProperty("java.io.tmpdir");
if (StringUtil.isEmpty(tmpDir)) {
// Stup... | java |
public static byte[] read(File pFile) throws IOException {
// Custom implementation, as we know the size of a file
if (!pFile.exists()) {
throw new FileNotFoundException(pFile.toString());
}
byte[] bytes = new byte[(int) pFile.length()];
InputStream in = null;... | java |
public static byte[] read(InputStream pInput) throws IOException {
// Create byte array
ByteArrayOutputStream bytes = new FastByteArrayOutputStream(BUF_SIZE);
// Copy from stream to byte array
copy(pInput, bytes);
return bytes.toByteArray();
} | java |
public static boolean write(File pFile, byte[] pData) throws IOException {
boolean success = false;
OutputStream out = null;
try {
out = new BufferedOutputStream(new FileOutputStream(pFile));
success = write(out, pData);
}
finally {
c... | java |
public static boolean delete(final File pFile, final boolean pForce) throws IOException {
if (pForce && pFile.isDirectory()) {
return deleteDir(pFile);
}
return pFile.exists() && pFile.delete();
} | java |
private static boolean fixProfileXYZTag(final ICC_Profile profile, final int tagSignature) {
byte[] data = profile.getData(tagSignature);
// The CMM expects 0x64 65 73 63 ('XYZ ') but is 0x17 A5 05 B8..?
if (data != null && intFromBigEndian(data, 0) == CORBIS_RGB_ALTERNATE_XYZ) {
in... | java |
private static void buildYCCtoRGBtable() {
if (ColorSpaces.DEBUG) {
System.err.println("Building YCC conversion table");
}
for (int i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
// i is the actual input pixel value, in the range 0..MAXJSAMPLE
// The... | java |
private int getOparamCountFromRequest(HttpServletRequest pRequest) {
// Use request.attribute for incrementing oparam counter
Integer count = (Integer) pRequest.getAttribute(COUNTER);
if (count == null) {
count = new Integer(0);
}
else {
count = new... | java |
private static int getFilterType(RenderingHints pHints) {
if (pHints == null) {
return FILTER_UNDEFINED;
}
if (pHints.containsKey(KEY_RESAMPLE_INTERPOLATION)) {
Object value = pHints.get(KEY_RESAMPLE_INTERPOLATION);
// NOTE: Workaround for a bug in Ren... | java |
public String getColumn(String pProperty) {
if (mPropertiesMap == null || pProperty == null)
return null;
return (String) mPropertiesMap.get(pProperty);
} | java |
public String getTable(String pProperty) {
String table = getColumn(pProperty);
if (table != null) {
int dotIdx = 0;
if ((dotIdx = table.lastIndexOf(".")) >= 0)
table = table.substring(0, dotIdx);
else
return null;
}
... | java |
public String getProperty(String pColumn) {
if (mColumnMap == null || pColumn == null)
return null;
String property = (String) mColumnMap.get(pColumn);
int dotIdx = 0;
if (property == null && (dotIdx = pColumn.lastIndexOf(".")) >= 0)
property = (String) ... | java |
public synchronized Object[] mapObjects(ResultSet pRSet) throws SQLException {
Vector result = new Vector();
ResultSetMetaData meta = pRSet.getMetaData();
int cols = meta.getColumnCount();
// Get colum names
String[] colNames = new String[cols];
for (int i = 0; ... | java |
String buildIdentitySQL(String[] pKeys) {
mTables = new Hashtable();
mColumns = new Vector();
// Get columns to select
mColumns.addElement(getPrimaryKey());
// Get tables to select (and join) from and their joins
tableJoins(null, false);
for (int i =... | java |
public String buildSQL() {
mTables = new Hashtable();
mColumns = new Vector();
String key = null;
for (Enumeration keys = mPropertiesMap.keys(); keys.hasMoreElements();) {
key = (String) keys.nextElement();
// Get columns to select
Strin... | java |
private String buildSelectClause() {
StringBuilder sqlBuf = new StringBuilder();
sqlBuf.append("SELECT ");
String column = null;
for (Enumeration select = mColumns.elements(); select.hasMoreElements();) {
column = (String) select.nextElement();
/*
... | java |
private void tableJoins(String pColumn, boolean pWhereJoin) {
String join = null;
String table = null;
if (pColumn == null) {
// Identity
join = getIdentityJoin();
table = getTable(getProperty(getPrimaryKey()));
}
else {
... | java |
public final void seek(long pPosition) throws IOException {
checkOpen();
// TODO: This is correct according to javax.imageio (IndexOutOfBoundsException),
// but it's inconsistent with reset that throws IOException...
if (pPosition < flushedPosition) {
throw new IndexOu... | java |
public static String getMIMEType(final String pFileExt) {
List<String> types = sExtToMIME.get(StringUtil.toLowerCase(pFileExt));
return (types == null || types.isEmpty()) ? null : types.get(0);
} | java |
public static List<String> getMIMETypes(final String pFileExt) {
List<String> types = sExtToMIME.get(StringUtil.toLowerCase(pFileExt));
return maskNull(types);
} | java |
private static List<String> getExtensionForWildcard(final String pMIME) {
final String family = pMIME.substring(0, pMIME.length() - 1);
Set<String> extensions = new LinkedHashSet<String>();
for (Map.Entry<String, List<String>> mimeToExt : sMIMEToExt.entrySet()) {
if ("*/".equals(... | java |
private static List<String> maskNull(List<String> pTypes) {
return (pTypes == null) ? Collections.<String>emptyList() : pTypes;
} | java |
public int decode(final InputStream stream, final ByteBuffer buffer) throws IOException {
while (buffer.remaining() >= 64) {
int val = stream.read();
if (val < 0) {
break; // EOF
}
if ((val & COMPRESSED_RUN_MASK) == COMPRESSED_RUN_MASK) {
... | java |
private boolean buildRegexpParser() {
// Convert wildcard string mask to regular expression
String regexp = convertWildcardExpressionToRegularExpression(mStringMask);
if (regexp == null) {
out.println(DebugUtil.getPrefixErrorMessage(this)
+ "irregularity in regexp conversion... | java |
private boolean checkStringToBeParsed(final String pStringToBeParsed) {
// Check for nullness
if (pStringToBeParsed == null) {
if (mDebugging) {
out.println(DebugUtil.getPrefixDebugMessage(this) + "string to be parsed is null - rejection!");
}
return false;
}
// Che... | java |
public static boolean isInAlphabet(final char pCharToCheck) {
for (int i = 0; i < ALPHABET.length; i++) {
if (pCharToCheck == ALPHABET[i]) {
return true;
}
}
return false;
} | java |
@SuppressWarnings({"UnusedDeclaration", "UnusedAssignment", "unchecked"})
public static void main(String[] pArgs) {
int howMany = 1000;
if (pArgs.length > 0) {
howMany = Integer.parseInt(pArgs[0]);
}
long start;
long end;
/*
int[] intArr... | java |
public static Object mergeArrays(Object pArray1, Object pArray2) {
return mergeArrays(pArray1, 0, Array.getLength(pArray1), pArray2, 0, Array.getLength(pArray2));
} | java |
@SuppressWarnings({"SuspiciousSystemArraycopy"})
public static Object mergeArrays(Object pArray1, int pOffset1, int pLength1, Object pArray2, int pOffset2, int pLength2) {
Class class1 = pArray1.getClass();
Class type = class1.getComponentType();
// Create new array of the new length
... | java |
public static <E> void addAll(Collection<E> pCollection, Iterator<? extends E> pIterator) {
while (pIterator.hasNext()) {
pCollection.add(pIterator.next());
}
} | java |
<T> void registerSPIs(final URL pResource, final Class<T> pCategory, final ClassLoader pLoader) {
Properties classNames = new Properties();
try {
classNames.load(pResource.openStream());
}
catch (IOException e) {
throw new ServiceConfigurationError(e);
... | java |
private <T> CategoryRegistry<T> getRegistry(final Class<T> pCategory) {
@SuppressWarnings({"unchecked"})
CategoryRegistry<T> registry = categoryMap.get(pCategory);
if (registry == null) {
throw new IllegalArgumentException("No such category: " + pCategory.getName());
}
... | java |
public boolean register(final Object pProvider) {
Iterator<Class<?>> categories = compatibleCategories(pProvider);
boolean registered = false;
while (categories.hasNext()) {
Class<?> category = categories.next();
if (registerImpl(pProvider, category) && !registered) ... | java |
public <T> boolean register(final T pProvider, final Class<? super T> pCategory) {
return registerImpl(pProvider, pCategory);
} | java |
public boolean deregister(final Object pProvider) {
Iterator<Class<?>> categories = containingCategories(pProvider);
boolean deregistered = false;
while (categories.hasNext()) {
Class<?> category = categories.next();
if (deregister(pProvider, category) && !deregist... | java |
public static boolean isEmpty(String[] pStringArray) {
// No elements to test
if (pStringArray == null) {
return true;
}
// Test all the elements
for (String string : pStringArray) {
if (!isEmpty(string)) {
return false;
... | java |
public static boolean contains(String pContainer, String pLookFor) {
return ((pContainer != null) && (pLookFor != null) && (pContainer.indexOf(pLookFor) >= 0));
} | java |
public static boolean containsIgnoreCase(String pString, int pChar) {
return ((pString != null)
&& ((pString.indexOf(Character.toLowerCase((char) pChar)) >= 0)
|| (pString.indexOf(Character.toUpperCase((char) pChar)) >= 0)));
// NOTE: I don't convert the string to ... | java |
public static int indexOfIgnoreCase(String pString, int pChar, int pPos) {
if ((pString == null)) {
return -1;
}
// Get first char
char lower = Character.toLowerCase((char) pChar);
char upper = Character.toUpperCase((char) pChar);
int indexLower;
... | java |
public static int lastIndexOfIgnoreCase(String pString, int pChar) {
return lastIndexOfIgnoreCase(pString, pChar, pString != null ? pString.length() : -1);
} | java |
public static int lastIndexOfIgnoreCase(String pString, int pChar, int pPos) {
if ((pString == null)) {
return -1;
}
// Get first char
char lower = Character.toLowerCase((char) pChar);
char upper = Character.toUpperCase((char) pChar);
int indexLower;
... | java |
public static String ltrim(String pString) {
if ((pString == null) || (pString.length() == 0)) {
return pString;// Null or empty string
}
for (int i = 0; i < pString.length(); i++) {
if (!Character.isWhitespace(pString.charAt(i))) {
if (i == 0) {
... | java |
public static String replace(String pSource, String pPattern, String pReplace) {
if (pPattern.length() == 0) {
return pSource;// Special case: No pattern to replace
}
int match;
int offset = 0;
StringBuilder result = new StringBuilder();
// Loop str... | java |
public static String replaceIgnoreCase(String pSource, String pPattern, String pReplace) {
if (pPattern.length() == 0) {
return pSource;// Special case: No pattern to replace
}
int match;
int offset = 0;
StringBuilder result = new StringBuilder();
whi... | java |
public static String capitalize(String pString, int pIndex) {
if (pIndex < 0) {
throw new IndexOutOfBoundsException("Negative index not allowed: " + pIndex);
}
if (pString == null || pString.length() <= pIndex) {
return pString;
}
// This is the f... | java |
public static String pad(String pSource, int pRequiredLength, String pPadString, boolean pPrepend) {
if (pPadString == null || pPadString.length() == 0) {
throw new IllegalArgumentException("Pad string: \"" + pPadString + "\"");
}
if (pSource.length() >= pRequiredLength) {
... | java |
public static String[] toStringArray(String pString, String pDelimiters) {
if (isEmpty(pString)) {
return new String[0];
}
StringTokenIterator st = new StringTokenIterator(pString, pDelimiters);
List<String> v = new ArrayList<String>();
while (st.hasMoreElem... | java |
public static int[] toIntArray(String pString, String pDelimiters, int pBase) {
if (isEmpty(pString)) {
return new int[0];
}
// Some room for improvement here...
String[] temp = toStringArray(pString, pDelimiters);
int[] array = new int[temp.length];
... | java |
public static long[] toLongArray(String pString, String pDelimiters) {
if (isEmpty(pString)) {
return new long[0];
}
// Some room for improvement here...
String[] temp = toStringArray(pString, pDelimiters);
long[] array = new long[temp.length];
for ... | java |
public static double[] toDoubleArray(String pString, String pDelimiters) {
if (isEmpty(pString)) {
return new double[0];
}
// Some room for improvement here...
String[] temp = toStringArray(pString, pDelimiters);
double[] array = new double[temp.length];
... | java |
public static String toCSVString(Object[] pStringArray, String pDelimiterString) {
if (pStringArray == null) {
return "";
}
if (pDelimiterString == null) {
throw new IllegalArgumentException("delimiter == null");
}
StringBuilder buffer = new Strin... | java |
static void loadLibrary0(String pLibrary, String pResource, ClassLoader pLoader) {
if (pLibrary == null) {
throw new IllegalArgumentException("library == null");
}
// Try loading normal way
UnsatisfiedLinkError unsatisfied;
try {
System.loadLibrar... | java |
public Rational plus(final Rational pOther) {
// special cases
if (equals(ZERO)) {
return pOther;
}
if (pOther.equals(ZERO)) {
return this;
}
// Find gcd of numerators and denominators
long f = gcd(numerator, pOther.numerator);
lon... | java |
public void service(PageContext pContext)
throws ServletException, IOException {
JspWriter writer = pContext.getOut();
writer.print(value);
} | java |
static void main(String[] argv) {
Time time = null;
TimeFormat in = null;
TimeFormat out = null;
if (argv.length >= 3) {
System.out.println("Creating out TimeFormat: \"" + argv[2] + "\"");
out = new TimeFormat(argv[2]);
}
if (argv.length >= 2) {
System.out.println("Creating in TimeForm... | java |
public String format(Time pTime) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < formatter.length; i++) {
buf.append(formatter[i].format(pTime));
}
return buf.toString();
} | java |
void registerContent(
final String pCacheURI,
final CacheRequest pRequest,
final CachedResponse pCachedResponse
) throws IOException {
// System.out.println(" ## HTTPCache ## Registering content for " + pCacheURI);
// pRequest.removeAttribute(ATTRIB_IS_STAL... | java |
static long getDateHeader(final String pHeaderValue) {
long date = -1L;
if (pHeaderValue != null) {
date = HTTPUtil.parseHTTPDate(pHeaderValue);
}
return date;
} | java |
public void service(ServletRequest pRequest, ServletResponse pResponse) throws IOException, ServletException {
int red = 0;
int green = 0;
int blue = 0;
// Get color parameter and parse color
String rgb = pRequest.getParameter(RGB_PARAME);
if (rgb != null && rgb.l... | java |
public static String getParameter(final ServletRequest pReq, final String pName, final String pDefault) {
String str = pReq.getParameter(pName);
return str != null ? str : pDefault;
} | java |
static <T> T getParameter(final ServletRequest pReq, final String pName, final Class<T> pType, final String pFormat, final T pDefault) {
// Test if pDefault is either null or instance of pType
if (pDefault != null && !pType.isInstance(pDefault)) {
throw new IllegalArgumentException("defau... | java |
static String getScriptName(final HttpServletRequest pRequest) {
String requestURI = pRequest.getRequestURI();
return StringUtil.getLastElement(requestURI, "/");
} | java |
public static String getSessionId(final HttpServletRequest pRequest) {
HttpSession session = pRequest.getSession();
return (session != null) ? session.getId() : null;
} | java |
protected static Object toUpper(final Object pObject) {
if (pObject instanceof String) {
return ((String) pObject).toUpperCase();
}
return pObject;
} | java |
private static long scanForSequence(final ImageInputStream pStream, final byte[] pSequence) throws IOException {
long start = -1l;
int index = 0;
int nullBytes = 0;
for (int read; (read = pStream.read()) >= 0;) {
if (pSequence[index] == (byte) read) {
// If ... | java |
private static InputStream getResourceAsStream(ClassLoader pClassLoader, String pName, boolean pGuessSuffix) {
InputStream is;
if (!pGuessSuffix) {
is = pClassLoader.getResourceAsStream(pName);
// If XML, wrap stream
if (is != null && pName.endsWith(XML_PROPE... | java |
private static InputStream getFileAsStream(String pName, boolean pGuessSuffix) {
InputStream is = null;
File propertiesFile;
try {
if (!pGuessSuffix) {
// Get file
propertiesFile = new File(pName);
if (propertiesFile.exists(... | java |
private static Properties loadProperties(InputStream pInput)
throws IOException {
if (pInput == null) {
throw new IllegalArgumentException("InputStream == null!");
}
Properties mapping = new Properties();
/*if (pInput instanceof XMLPropertiesInputStream) {
... | java |
private static char initMaxDelimiter(char[] pDelimiters) {
if (pDelimiters == null) {
return 0;
}
char max = 0;
for (char c : pDelimiters) {
if (max < c) {
max = c;
}
}
return max;
} | java |
private Rectangle getPICTFrame() throws IOException {
if (frame == null) {
// Read in header information
readPICTHeader(imageInput);
if (DEBUG) {
System.out.println("Done reading PICT header!");
}
}
return frame;
} | java |
private void readPICTHeader(final ImageInputStream pStream) throws IOException {
pStream.seek(0l);
try {
readPICTHeader0(pStream);
}
catch (IIOException e) {
// Rest and try again
pStream.seek(0l);
// Skip first 512 bytes
PICT... | java |
private void readRectangle(DataInput pStream, Rectangle pDestRect) throws IOException {
int y = pStream.readUnsignedShort();
int x = pStream.readUnsignedShort();
int h = pStream.readUnsignedShort();
int w = pStream.readUnsignedShort();
pDestRect.setLocation(getXPtCoord(x), getYP... | java |
private Polygon readPoly(DataInput pStream, Rectangle pBounds) throws IOException {
// Get polygon data size
int size = pStream.readUnsignedShort();
// Get poly bounds
readRectangle(pStream, pBounds);
// Initialize the point array to the right size
int points = (size - ... | java |
public void setMaxConcurrentThreadCount(String pMaxConcurrentThreadCount) {
if (!StringUtil.isEmpty(pMaxConcurrentThreadCount)) {
try {
maxConcurrentThreadCount = Integer.parseInt(pMaxConcurrentThreadCount);
}
catch (NumberFormatException nfe) {
... | java |
private String getContentType(HttpServletRequest pRequest) {
if (responseMessageTypes != null) {
String accept = pRequest.getHeader("Accept");
for (String type : responseMessageTypes) {
// Note: This is not 100% correct way of doing content negotiation
... | java |
private String getMessage(String pContentType) {
String fileName = responseMessageNames.get(pContentType);
// Get cached value
CacheEntry entry = responseCache.get(fileName);
if ((entry == null) || entry.isExpired()) {
// Create and add or replace cached value
... | java |
private String readMessage(String pFileName) {
try {
// Read resource from web app
InputStream is = getServletContext().getResourceAsStream(pFileName);
if (is != null) {
return new String(FileUtil.read(is));
}
else {
... | java |
public void init() throws ServletException {
FilterConfig config = getFilterConfig();
// Default don't delete cache files on exit (persistent cache)
boolean deleteCacheOnExit = "TRUE".equalsIgnoreCase(config.getInitParameter("deleteCacheOnExit"));
// Default expiry time 10 minute... | java |
protected Entry<K, V> removeEntry(Entry<K, V> pEntry) {
if (pEntry == null) {
return null;
}
// Find candidate entry for this key
Entry<K, V> candidate = getEntry(pEntry.getKey());
if (candidate == pEntry || (candidate != null && candidate.equals(pEntry))) {
... | java |
public void writeHtml(JspWriter pOut, String pHtml) throws IOException {
StringTokenizer parser = new StringTokenizer(pHtml, "<>&", true);
while (parser.hasMoreTokens()) {
String token = parser.nextToken();
if (token.equals("<")) {
pOut.print("<");
... | java |
public String getInitParameter(String pName, int pScope) {
switch (pScope) {
case PageContext.PAGE_SCOPE:
return getServletConfig().getInitParameter(pName);
case PageContext.APPLICATION_SCOPE:
return getServletContext().getInitParameter(pName);
... | java |
public Enumeration getInitParameterNames(int pScope) {
switch (pScope) {
case PageContext.PAGE_SCOPE:
return getServletConfig().getInitParameterNames();
case PageContext.APPLICATION_SCOPE:
return getServletContext().getInitParameterNames();
... | java |
public InputStream getResourceAsStream(String pPath) {
//throws MalformedURLException {
String path = pPath;
if (pPath != null && !pPath.startsWith("/")) {
path = getContextPath() + pPath;
}
return pageContext.getServletContext().getResourceAsStream(path);
... | java |
public static boolean isCS_sRGB(final ICC_Profile profile) {
Validate.notNull(profile, "profile");
return profile.getColorSpaceType() == ColorSpace.TYPE_RGB && Arrays.equals(getProfileHeaderWithProfileId(profile), sRGB.header);
} | java |
public Object toObject(String pString, Class pType, String pFormat) throws ConversionException {
if (StringUtil.isEmpty(pString))
return null;
try {
DateFormat format;
if (pFormat == null) {
// Use system default format, using default lo... | java |
private static int[] toRGBArray(int pARGB, int[] pBuffer) {
pBuffer[0] = ((pARGB & 0x00ff0000) >> 16);
pBuffer[1] = ((pARGB & 0x0000ff00) >> 8);
pBuffer[2] = ((pARGB & 0x000000ff));
//pBuffer[3] = ((pARGB & 0xff000000) >> 24); // alpha
return pBuffer;
} | java |
protected RenderedImage doFilter(BufferedImage pImage, ServletRequest pRequest, ImageServletResponse pResponse) {
// Get quality setting
// SMOOTH | FAST | REPLICATE | DEFAULT | AREA_AVERAGING
// See Image (mHints)
int quality = getQuality(pRequest.getParameter(PARAM_SCALE_QUALITY)... | java |
protected int getQuality(String pQualityStr) {
if (!StringUtil.isEmpty(pQualityStr)) {
try {
// Get quality constant from Image using reflection
Class cl = Image.class;
Field field = cl.getField(pQualityStr.toUpperCase());
retur... | java |
protected int getUnits(String pUnitStr) {
if (StringUtil.isEmpty(pUnitStr)
|| pUnitStr.equalsIgnoreCase("PIXELS")) {
return UNITS_PIXELS;
}
else if (pUnitStr.equalsIgnoreCase("PERCENT")) {
return UNITS_PERCENT;
}
else {
... | java |
private int getHuffmanValue(final int table[], final int temp[], final int index[]) throws IOException {
int code, input;
final int mask = 0xFFFF;
if (index[0] < 8) {
temp[0] <<= 8;
input = this.input.readUnsignedByte();
if (input == 0xFF) {
m... | java |
public void write(final byte[] pBytes, final int pOffset, final int pLength) throws IOException {
if (!flushOnWrite && pLength < buffer.remaining()) {
// Buffer data
buffer.put(pBytes, pOffset, pLength);
}
else {
// Encode data already in the buffer
... | java |
private static URL getURLAndSetAuthorization(final String pURL, final Properties pProperties) throws MalformedURLException {
String url = pURL;
// Split user/password away from url
String userPass = null;
String protocolPrefix = HTTP;
int httpIdx = url.indexOf(HTTPS);
if... | java |
public static HttpURLConnection createHttpURLConnection(URL pURL, Properties pProperties, boolean pFollowRedirects, int pTimeout)
throws IOException {
// Open the connection, and get the stream
HttpURLConnection conn;
if (pTimeout > 0) {
// Supports timeout
... | java |
public static String encode(byte[] pData) {
int offset = 0;
int len;
StringBuilder buf = new StringBuilder();
while ((pData.length - offset) > 0) {
byte a, b, c;
if ((pData.length - offset) > 2) {
len = 3;
}
else {
... | java |
public void setSourceSubsampling(int pXSub, int pYSub) {
// Re-fetch everything, if subsampling changed
if (xSub != pXSub || ySub != pYSub) {
dispose();
}
if (pXSub > 1) {
xSub = pXSub;
}
if (pYSub > 1) {
ySub = pYSub;
}
} | java |
public void addProgressListener(ProgressListener pListener) {
if (pListener == null) {
return;
}
if (listeners == null) {
listeners = new CopyOnWriteArrayList<ProgressListener>();
}
listeners.add(pListener);
} | java |
public void removeProgressListener(ProgressListener pListener) {
if (pListener == null) {
return;
}
if (listeners == null) {
return;
}
listeners.remove(pListener);
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.