id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
154,300 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/util/MainApplication.java | MainApplication.createRemoteTask | public RemoteTask createRemoteTask(String strServer, String strRemoteApp, String strUserID, String strPassword)
{
RemoteTask remoteTask = super.createRemoteTask(strServer, strRemoteApp, strUserID, strPassword);
return remoteTask;
} | java | public RemoteTask createRemoteTask(String strServer, String strRemoteApp, String strUserID, String strPassword)
{
RemoteTask remoteTask = super.createRemoteTask(strServer, strRemoteApp, strUserID, strPassword);
return remoteTask;
} | [
"public",
"RemoteTask",
"createRemoteTask",
"(",
"String",
"strServer",
",",
"String",
"strRemoteApp",
",",
"String",
"strUserID",
",",
"String",
"strPassword",
")",
"{",
"RemoteTask",
"remoteTask",
"=",
"super",
".",
"createRemoteTask",
"(",
"strServer",
",",
"st... | Connect to the remote server and get the remote server object.
@param strServer The (rmi) server.
@param The remote application name in jndi index.
@return The remote server object. | [
"Connect",
"to",
"the",
"remote",
"server",
"and",
"get",
"the",
"remote",
"server",
"object",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/util/MainApplication.java#L636-L640 |
154,301 | arxanchain/java-common | src/main/java/com/arxanfintech/common/crypto/core/ConcatKDFBytesGenerator.java | ConcatKDFBytesGenerator.generateBytes | public int generateBytes(byte[] out, int outOff, int len) throws DataLengthException,
IllegalArgumentException
{
if ((out.length - len) < outOff)
{
throw new DataLengthException("output buffer too small");
}
long oBytes = len;
int outLen = digest.getD... | java | public int generateBytes(byte[] out, int outOff, int len) throws DataLengthException,
IllegalArgumentException
{
if ((out.length - len) < outOff)
{
throw new DataLengthException("output buffer too small");
}
long oBytes = len;
int outLen = digest.getD... | [
"public",
"int",
"generateBytes",
"(",
"byte",
"[",
"]",
"out",
",",
"int",
"outOff",
",",
"int",
"len",
")",
"throws",
"DataLengthException",
",",
"IllegalArgumentException",
"{",
"if",
"(",
"(",
"out",
".",
"length",
"-",
"len",
")",
"<",
"outOff",
")"... | fill len bytes of the output buffer with bytes generated from the
derivation function.
@throws IllegalArgumentException
if the size of the request will cause an overflow.
@throws DataLengthException
if the out buffer is too small. | [
"fill",
"len",
"bytes",
"of",
"the",
"output",
"buffer",
"with",
"bytes",
"generated",
"from",
"the",
"derivation",
"function",
"."
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/crypto/core/ConcatKDFBytesGenerator.java#L97-L161 |
154,302 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.severe | public void severe(String format, Object... args)
{
if (isLoggable(SEVERE))
{
logIt(SEVERE, String.format(format, args));
}
} | java | public void severe(String format, Object... args)
{
if (isLoggable(SEVERE))
{
logIt(SEVERE, String.format(format, args));
}
} | [
"public",
"void",
"severe",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"SEVERE",
")",
")",
"{",
"logIt",
"(",
"SEVERE",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
"}"... | Write to log SEVERE level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"SEVERE",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L45-L51 |
154,303 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.warning | public void warning(String format, Object... args)
{
if (isLoggable(WARNING))
{
logIt(WARNING, String.format(format, args));
}
} | java | public void warning(String format, Object... args)
{
if (isLoggable(WARNING))
{
logIt(WARNING, String.format(format, args));
}
} | [
"public",
"void",
"warning",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"WARNING",
")",
")",
"{",
"logIt",
"(",
"WARNING",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
... | Write to log at WARNING level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"WARNING",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L70-L76 |
154,304 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.info | public void info(String format, Object... args)
{
if (isLoggable(INFO))
{
logIt(INFO, String.format(format, args));
}
} | java | public void info(String format, Object... args)
{
if (isLoggable(INFO))
{
logIt(INFO, String.format(format, args));
}
} | [
"public",
"void",
"info",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"INFO",
")",
")",
"{",
"logIt",
"(",
"INFO",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
"}",
"}... | Write to log at INFO level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"INFO",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L95-L101 |
154,305 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.config | public void config(String format, Object... args)
{
if (isLoggable(CONFIG))
{
logIt(CONFIG, String.format(format, args));
}
} | java | public void config(String format, Object... args)
{
if (isLoggable(CONFIG))
{
logIt(CONFIG, String.format(format, args));
}
} | [
"public",
"void",
"config",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"CONFIG",
")",
")",
"{",
"logIt",
"(",
"CONFIG",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
"}"... | Write to log at CONFIG level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"CONFIG",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L120-L126 |
154,306 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.fine | public void fine(String format, Object... args)
{
if (isLoggable(FINE))
{
logIt(FINE, String.format(format, args));
}
} | java | public void fine(String format, Object... args)
{
if (isLoggable(FINE))
{
logIt(FINE, String.format(format, args));
}
} | [
"public",
"void",
"fine",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"FINE",
")",
")",
"{",
"logIt",
"(",
"FINE",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
"}",
"}... | Write to log at FINE level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"FINE",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L145-L151 |
154,307 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.finer | public void finer(String format, Object... args)
{
if (isLoggable(FINER))
{
logIt(FINER, String.format(format, args));
}
} | java | public void finer(String format, Object... args)
{
if (isLoggable(FINER))
{
logIt(FINER, String.format(format, args));
}
} | [
"public",
"void",
"finer",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"FINER",
")",
")",
"{",
"logIt",
"(",
"FINER",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
"}",
... | Write to log at FINER level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"FINER",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L170-L176 |
154,308 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.finest | public void finest(String format, Object... args)
{
if (isLoggable(FINEST))
{
logIt(FINEST, String.format(format, args));
}
} | java | public void finest(String format, Object... args)
{
if (isLoggable(FINEST))
{
logIt(FINEST, String.format(format, args));
}
} | [
"public",
"void",
"finest",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"FINEST",
")",
")",
"{",
"logIt",
"(",
"FINEST",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
"}"... | Write to log at FINEST level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"FINEST",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L195-L201 |
154,309 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.verbose | public void verbose(String format, Object... args)
{
if (isLoggable(VERBOSE))
{
logIt(VERBOSE, String.format(format, args));
}
} | java | public void verbose(String format, Object... args)
{
if (isLoggable(VERBOSE))
{
logIt(VERBOSE, String.format(format, args));
}
} | [
"public",
"void",
"verbose",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"VERBOSE",
")",
")",
"{",
"logIt",
"(",
"VERBOSE",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
... | Write to log at VERBOSE level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"VERBOSE",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L220-L226 |
154,310 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.debug | public void debug(String format, Object... args)
{
if (isLoggable(DEBUG))
{
logIt(DEBUG, String.format(format, args));
}
} | java | public void debug(String format, Object... args)
{
if (isLoggable(DEBUG))
{
logIt(DEBUG, String.format(format, args));
}
} | [
"public",
"void",
"debug",
"(",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"DEBUG",
")",
")",
"{",
"logIt",
"(",
"DEBUG",
",",
"String",
".",
"format",
"(",
"format",
",",
"args",
")",
")",
";",
"}",
... | Write to log at DEBUG level.
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log",
"at",
"DEBUG",
"level",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L245-L251 |
154,311 | tvesalainen/util | util/src/main/java/org/vesalainen/util/logging/BaseLogging.java | BaseLogging.log | public void log(Level level, String format, Object... args)
{
if (isLoggable(level))
{
if (format != null)
{
logIt(level, String.format(format, args));
}
else
{
logIt(level, String.format("%s format... | java | public void log(Level level, String format, Object... args)
{
if (isLoggable(level))
{
if (format != null)
{
logIt(level, String.format(format, args));
}
else
{
logIt(level, String.format("%s format... | [
"public",
"void",
"log",
"(",
"Level",
"level",
",",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"isLoggable",
"(",
"level",
")",
")",
"{",
"if",
"(",
"format",
"!=",
"null",
")",
"{",
"logIt",
"(",
"level",
",",
"String"... | Write to log
@param level
@param format
@param args
@see java.util.Formatter#format(java.lang.String, java.lang.Object...)
@see java.util.logging.Level | [
"Write",
"to",
"log"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/logging/BaseLogging.java#L271-L284 |
154,312 | jbundle/jbundle | thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseToolbar.java | JBaseToolbar.addButton | public JButton addButton(String strParam)
{
String strDesc = strParam;
BaseApplet applet = this.getBaseApplet();
if (applet != null)
strDesc = applet.getString(strParam);
return this.addButton(strDesc, strParam);
} | java | public JButton addButton(String strParam)
{
String strDesc = strParam;
BaseApplet applet = this.getBaseApplet();
if (applet != null)
strDesc = applet.getString(strParam);
return this.addButton(strDesc, strParam);
} | [
"public",
"JButton",
"addButton",
"(",
"String",
"strParam",
")",
"{",
"String",
"strDesc",
"=",
"strParam",
";",
"BaseApplet",
"applet",
"=",
"this",
".",
"getBaseApplet",
"(",
")",
";",
"if",
"(",
"applet",
"!=",
"null",
")",
"strDesc",
"=",
"applet",
... | Add a button to this window.
Convert this param to the local string and call addButton.
@param The key for this button.
@return TODO | [
"Add",
"a",
"button",
"to",
"this",
"window",
".",
"Convert",
"this",
"param",
"to",
"the",
"local",
"string",
"and",
"call",
"addButton",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/screen/src/main/java/org/jbundle/thin/base/screen/JBaseToolbar.java#L69-L76 |
154,313 | DDTH/ddth-tsc | ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/internal/MetadataManager.java | MetadataManager.getCounterMetadata | public CounterMetadata getCounterMetadata(String counterName) {
// first fetch metadata for the specified counter
String jsonString = getRow(counterName);
if (jsonString != null) {
CounterMetadata result = CounterMetadata.fromJsonString(jsonString);
if (result != null) {
... | java | public CounterMetadata getCounterMetadata(String counterName) {
// first fetch metadata for the specified counter
String jsonString = getRow(counterName);
if (jsonString != null) {
CounterMetadata result = CounterMetadata.fromJsonString(jsonString);
if (result != null) {
... | [
"public",
"CounterMetadata",
"getCounterMetadata",
"(",
"String",
"counterName",
")",
"{",
"// first fetch metadata for the specified counter",
"String",
"jsonString",
"=",
"getRow",
"(",
"counterName",
")",
";",
"if",
"(",
"jsonString",
"!=",
"null",
")",
"{",
"Count... | Gets a counter metadata by name.
@param name
@return | [
"Gets",
"a",
"counter",
"metadata",
"by",
"name",
"."
] | d233c304c8fed2f3c069de42a36b7bbd5c8be01b | https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/cassandra/internal/MetadataManager.java#L154-L167 |
154,314 | lightblueseas/vintage-time | src/main/java/de/alpharogroup/date/CreateDateExtensions.java | CreateDateExtensions.newRandomDate | public static Date newRandomDate(final Date from)
{
final Random secrand = new SecureRandom();
final double randDouble = -secrand.nextDouble() * from.getTime();
final double randomDouble = from.getTime() - secrand.nextDouble();
final double result = randDouble * randomDouble;
return new Date((long)result);
... | java | public static Date newRandomDate(final Date from)
{
final Random secrand = new SecureRandom();
final double randDouble = -secrand.nextDouble() * from.getTime();
final double randomDouble = from.getTime() - secrand.nextDouble();
final double result = randDouble * randomDouble;
return new Date((long)result);
... | [
"public",
"static",
"Date",
"newRandomDate",
"(",
"final",
"Date",
"from",
")",
"{",
"final",
"Random",
"secrand",
"=",
"new",
"SecureRandom",
"(",
")",
";",
"final",
"double",
"randDouble",
"=",
"-",
"secrand",
".",
"nextDouble",
"(",
")",
"*",
"from",
... | Creates the random date.
@param from
the from
@return the date | [
"Creates",
"the",
"random",
"date",
"."
] | fbf201e679d9f9b92e7b5771f3eea1413cc2e113 | https://github.com/lightblueseas/vintage-time/blob/fbf201e679d9f9b92e7b5771f3eea1413cc2e113/src/main/java/de/alpharogroup/date/CreateDateExtensions.java#L174-L181 |
154,315 | kametic/specifications | src/main/java/org/kametic/specifications/reflect/ClassMethodsAnnotatedWith.java | ClassMethodsAnnotatedWith.getAllInterfacesAndClasses | @SuppressWarnings("unchecked")
Class<?>[] getAllInterfacesAndClasses ( Class<?>[] classes )
{
if(0 == classes.length )
{
return classes;
}
else
{
List<Class<?>> extendedClasses = new ArrayList<Class<?>>();
// all interfaces h... | java | @SuppressWarnings("unchecked")
Class<?>[] getAllInterfacesAndClasses ( Class<?>[] classes )
{
if(0 == classes.length )
{
return classes;
}
else
{
List<Class<?>> extendedClasses = new ArrayList<Class<?>>();
// all interfaces h... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"Class",
"<",
"?",
">",
"[",
"]",
"getAllInterfacesAndClasses",
"(",
"Class",
"<",
"?",
">",
"[",
"]",
"classes",
")",
"{",
"if",
"(",
"0",
"==",
"classes",
".",
"length",
")",
"{",
"return",
"classes... | possibly contain the declaration of the annotated method we're looking for. | [
"possibly",
"contain",
"the",
"declaration",
"of",
"the",
"annotated",
"method",
"we",
"re",
"looking",
"for",
"."
] | 7453ced475355bac8adae7605e259354e0a96479 | https://github.com/kametic/specifications/blob/7453ced475355bac8adae7605e259354e0a96479/src/main/java/org/kametic/specifications/reflect/ClassMethodsAnnotatedWith.java#L77-L108 |
154,316 | tsweets/jdefault | src/main/java/org/beer30/jdefault/JDefaultIdentity.java | JDefaultIdentity.driversLicense | public static String driversLicense() {
StringBuffer dl = new StringBuffer(JDefaultAddress.stateAbbr());
dl.append("-");
dl.append(JDefaultNumber.randomNumberString(8));
return dl.toString();
} | java | public static String driversLicense() {
StringBuffer dl = new StringBuffer(JDefaultAddress.stateAbbr());
dl.append("-");
dl.append(JDefaultNumber.randomNumberString(8));
return dl.toString();
} | [
"public",
"static",
"String",
"driversLicense",
"(",
")",
"{",
"StringBuffer",
"dl",
"=",
"new",
"StringBuffer",
"(",
"JDefaultAddress",
".",
"stateAbbr",
"(",
")",
")",
";",
"dl",
".",
"append",
"(",
"\"-\"",
")",
";",
"dl",
".",
"append",
"(",
"JDefaul... | Creates a Driver's license in the format of 2 Letter State Code, Dash, 8 Digit Random Number
ie CO-12345678
@return driver's license string | [
"Creates",
"a",
"Driver",
"s",
"license",
"in",
"the",
"format",
"of",
"2",
"Letter",
"State",
"Code",
"Dash",
"8",
"Digit",
"Random",
"Number",
"ie",
"CO",
"-",
"12345678"
] | 1793ab8e1337e930f31e362071db4af0c3978b70 | https://github.com/tsweets/jdefault/blob/1793ab8e1337e930f31e362071db4af0c3978b70/src/main/java/org/beer30/jdefault/JDefaultIdentity.java#L63-L69 |
154,317 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.free | public void free()
{
if (m_messageReceiver != null)
m_messageReceiver.removeMessageFilter(this, false); // Remove from this and don't free again
m_messageReceiver = null;
while (this.getMessageListener(0) != null)
{
JMessageListener listener = this.ge... | java | public void free()
{
if (m_messageReceiver != null)
m_messageReceiver.removeMessageFilter(this, false); // Remove from this and don't free again
m_messageReceiver = null;
while (this.getMessageListener(0) != null)
{
JMessageListener listener = this.ge... | [
"public",
"void",
"free",
"(",
")",
"{",
"if",
"(",
"m_messageReceiver",
"!=",
"null",
")",
"m_messageReceiver",
".",
"removeMessageFilter",
"(",
"this",
",",
"false",
")",
";",
"// Remove from this and don't free again",
"m_messageReceiver",
"=",
"null",
";",
"wh... | Free this object.
If I belong to a message listener, set my reference to null, and free the listener.
If I belong to a messagereceiver, remove this filter from it. | [
"Free",
"this",
"object",
".",
"If",
"I",
"belong",
"to",
"a",
"message",
"listener",
"set",
"my",
"reference",
"to",
"null",
"and",
"free",
"the",
"listener",
".",
"If",
"I",
"belong",
"to",
"a",
"messagereceiver",
"remove",
"this",
"filter",
"from",
"i... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L126-L143 |
154,318 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.setRemoteFilterInfo | public void setRemoteFilterInfo(String strRemoteQueueName, String strRemoteQueueType, Integer intRemoteQueueID, Integer intRegistryID)
{
m_strRemoteQueueName = strRemoteQueueName;
m_strRemoteQueueType = strRemoteQueueType;
m_intRemoteID = intRemoteQueueID;
m_intRegistryID = intRegist... | java | public void setRemoteFilterInfo(String strRemoteQueueName, String strRemoteQueueType, Integer intRemoteQueueID, Integer intRegistryID)
{
m_strRemoteQueueName = strRemoteQueueName;
m_strRemoteQueueType = strRemoteQueueType;
m_intRemoteID = intRemoteQueueID;
m_intRegistryID = intRegist... | [
"public",
"void",
"setRemoteFilterInfo",
"(",
"String",
"strRemoteQueueName",
",",
"String",
"strRemoteQueueType",
",",
"Integer",
"intRemoteQueueID",
",",
"Integer",
"intRegistryID",
")",
"{",
"m_strRemoteQueueName",
"=",
"strRemoteQueueName",
";",
"m_strRemoteQueueType",
... | Set the links to the remote filter.
@param strRemoteQueueName The remote queue name.
@param strRemoteQueueType The remote queue type.
@param intRemoteQueueID The remote queue ID. | [
"Set",
"the",
"links",
"to",
"the",
"remote",
"filter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L208-L214 |
154,319 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.addMessageListener | public void addMessageListener(JMessageListener listener)
{
if (listener == null)
return; // Never
this.removeDuplicateFilters(listener); // Remove any duplicate record filters
if (m_vListenerList == null)
m_vListenerList = new Vector<JMessageListener>();
for... | java | public void addMessageListener(JMessageListener listener)
{
if (listener == null)
return; // Never
this.removeDuplicateFilters(listener); // Remove any duplicate record filters
if (m_vListenerList == null)
m_vListenerList = new Vector<JMessageListener>();
for... | [
"public",
"void",
"addMessageListener",
"(",
"JMessageListener",
"listener",
")",
"{",
"if",
"(",
"listener",
"==",
"null",
")",
"return",
";",
"// Never",
"this",
".",
"removeDuplicateFilters",
"(",
"listener",
")",
";",
"// Remove any duplicate record filters",
"i... | Add this message listener to the listener list.
Also adds the filter to my filter list.
@param listener The message listener to set this filter to. | [
"Add",
"this",
"message",
"listener",
"to",
"the",
"listener",
"list",
".",
"Also",
"adds",
"the",
"filter",
"to",
"my",
"filter",
"list",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L284-L301 |
154,320 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.removeDuplicateFilters | public void removeDuplicateFilters(JMessageListener listenerToCheck)
{
for (int iIndex = 0; ; iIndex++)
{
BaseMessageFilter filter = listenerToCheck.getListenerMessageFilter(iIndex);
if (filter == null)
break;
if (this.isSameFilter(filter))
... | java | public void removeDuplicateFilters(JMessageListener listenerToCheck)
{
for (int iIndex = 0; ; iIndex++)
{
BaseMessageFilter filter = listenerToCheck.getListenerMessageFilter(iIndex);
if (filter == null)
break;
if (this.isSameFilter(filter))
... | [
"public",
"void",
"removeDuplicateFilters",
"(",
"JMessageListener",
"listenerToCheck",
")",
"{",
"for",
"(",
"int",
"iIndex",
"=",
"0",
";",
";",
"iIndex",
"++",
")",
"{",
"BaseMessageFilter",
"filter",
"=",
"listenerToCheck",
".",
"getListenerMessageFilter",
"("... | If there is another RecordMessageFilter supplying messages to this listener, remove it.
This typically fixes the problem in TableModelSession where a grid listener is added for the session and then also when thin needs a listener
@param listenerToCheck | [
"If",
"there",
"is",
"another",
"RecordMessageFilter",
"supplying",
"messages",
"to",
"this",
"listener",
"remove",
"it",
".",
"This",
"typically",
"fixes",
"the",
"problem",
"in",
"TableModelSession",
"where",
"a",
"grid",
"listener",
"is",
"added",
"for",
"the... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L307-L325 |
154,321 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.isSameFilter | public boolean isSameFilter(BaseMessageFilter filter)
{
if (filter.getClass().equals(this.getClass()))
{
if (filter.isFilterMatch(this))
; // return true;? todo (don) You need to figure out how to compare filters
}
return false;
} | java | public boolean isSameFilter(BaseMessageFilter filter)
{
if (filter.getClass().equals(this.getClass()))
{
if (filter.isFilterMatch(this))
; // return true;? todo (don) You need to figure out how to compare filters
}
return false;
} | [
"public",
"boolean",
"isSameFilter",
"(",
"BaseMessageFilter",
"filter",
")",
"{",
"if",
"(",
"filter",
".",
"getClass",
"(",
")",
".",
"equals",
"(",
"this",
".",
"getClass",
"(",
")",
")",
")",
"{",
"if",
"(",
"filter",
".",
"isFilterMatch",
"(",
"th... | Are these filters functionally the same?
Override this to compare filters.
@return true if they are. | [
"Are",
"these",
"filters",
"functionally",
"the",
"same?",
"Override",
"this",
"to",
"compare",
"filters",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L331-L339 |
154,322 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.removeFilterMessageListener | public void removeFilterMessageListener(JMessageListener listener)
{
if (listener == null)
return; // Never
if (m_vListenerList == null)
return; // Never
for (int i = 0; i < m_vListenerList.size(); i++)
{
if (m_vListenerList.get(i) == listener)
... | java | public void removeFilterMessageListener(JMessageListener listener)
{
if (listener == null)
return; // Never
if (m_vListenerList == null)
return; // Never
for (int i = 0; i < m_vListenerList.size(); i++)
{
if (m_vListenerList.get(i) == listener)
... | [
"public",
"void",
"removeFilterMessageListener",
"(",
"JMessageListener",
"listener",
")",
"{",
"if",
"(",
"listener",
"==",
"null",
")",
"return",
";",
"// Never",
"if",
"(",
"m_vListenerList",
"==",
"null",
")",
"return",
";",
"// Never",
"for",
"(",
"int",
... | Set the message listener.
@param listener The message listener to set this filter to. | [
"Set",
"the",
"message",
"listener",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L344-L356 |
154,323 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.getMessageListener | public JMessageListener getMessageListener(int iIndex)
{
if (m_vListenerList == null)
return null;
if (iIndex >= m_vListenerList.size())
return null;
return m_vListenerList.get(iIndex);
} | java | public JMessageListener getMessageListener(int iIndex)
{
if (m_vListenerList == null)
return null;
if (iIndex >= m_vListenerList.size())
return null;
return m_vListenerList.get(iIndex);
} | [
"public",
"JMessageListener",
"getMessageListener",
"(",
"int",
"iIndex",
")",
"{",
"if",
"(",
"m_vListenerList",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"iIndex",
">=",
"m_vListenerList",
".",
"size",
"(",
")",
")",
"return",
"null",
";",
"re... | Get the message listener for this filter.
@return The listener. | [
"Get",
"the",
"message",
"listener",
"for",
"this",
"filter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L361-L368 |
154,324 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.setMessageReceiver | public void setMessageReceiver(BaseMessageReceiver messageReceiver, Integer intID)
{
if ((messageReceiver != null) || (intID != null))
if ((m_intID != null) || (m_messageReceiver != null))
Util.getLogger().warning("BaseMessageFilter/setMessageReceiver()----Error - Filter added tw... | java | public void setMessageReceiver(BaseMessageReceiver messageReceiver, Integer intID)
{
if ((messageReceiver != null) || (intID != null))
if ((m_intID != null) || (m_messageReceiver != null))
Util.getLogger().warning("BaseMessageFilter/setMessageReceiver()----Error - Filter added tw... | [
"public",
"void",
"setMessageReceiver",
"(",
"BaseMessageReceiver",
"messageReceiver",
",",
"Integer",
"intID",
")",
"{",
"if",
"(",
"(",
"messageReceiver",
"!=",
"null",
")",
"||",
"(",
"intID",
"!=",
"null",
")",
")",
"if",
"(",
"(",
"m_intID",
"!=",
"nu... | Set the message receiver for this filter.
@param messageReceiver The message receiver. | [
"Set",
"the",
"message",
"receiver",
"for",
"this",
"filter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L373-L380 |
154,325 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.updateFilterMap | public final void updateFilterMap(Map<String,Object> propFilter)
{
if (propFilter == null)
propFilter = new HashMap<String,Object>(); // Then handleUpdateFilterMap can modify the filter
propFilter = this.handleUpdateFilterMap(propFilter); // Update this object's local filter.
... | java | public final void updateFilterMap(Map<String,Object> propFilter)
{
if (propFilter == null)
propFilter = new HashMap<String,Object>(); // Then handleUpdateFilterMap can modify the filter
propFilter = this.handleUpdateFilterMap(propFilter); // Update this object's local filter.
... | [
"public",
"final",
"void",
"updateFilterMap",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"propFilter",
")",
"{",
"if",
"(",
"propFilter",
"==",
"null",
")",
"propFilter",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"// ... | Update this object's filter with this new map information.
@param propFilter New filter information (ie, bookmark=345) pass null to sync the local and remote filters. | [
"Update",
"this",
"object",
"s",
"filter",
"with",
"this",
"new",
"map",
"information",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L435-L441 |
154,326 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.setFilterMap | public final void setFilterMap(Map<String, Object> propFilter)
{
if (this.getMessageReceiver() != null)
this.getMessageReceiver().setNewFilterProperties(this, null, propFilter); // Update any remote copy of this.
} | java | public final void setFilterMap(Map<String, Object> propFilter)
{
if (this.getMessageReceiver() != null)
this.getMessageReceiver().setNewFilterProperties(this, null, propFilter); // Update any remote copy of this.
} | [
"public",
"final",
"void",
"setFilterMap",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"propFilter",
")",
"{",
"if",
"(",
"this",
".",
"getMessageReceiver",
"(",
")",
"!=",
"null",
")",
"this",
".",
"getMessageReceiver",
"(",
")",
".",
"setNewFilterProp... | Update the remote filter with this new map information.
@param propFilter New filter information (ie, bookmark=345). | [
"Update",
"the",
"remote",
"filter",
"with",
"this",
"new",
"map",
"information",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L478-L482 |
154,327 | jbundle/jbundle | thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java | BaseMessageFilter.setFilterTree | public final void setFilterTree(Object[][] mxProperties)
{
if (this.getMessageReceiver() != null)
this.getMessageReceiver().setNewFilterProperties(this, mxProperties, null); // Update any remote copy of this.
else
this.setNameValueTree(mxProperties); // Rarely called (typicall... | java | public final void setFilterTree(Object[][] mxProperties)
{
if (this.getMessageReceiver() != null)
this.getMessageReceiver().setNewFilterProperties(this, mxProperties, null); // Update any remote copy of this.
else
this.setNameValueTree(mxProperties); // Rarely called (typicall... | [
"public",
"final",
"void",
"setFilterTree",
"(",
"Object",
"[",
"]",
"[",
"]",
"mxProperties",
")",
"{",
"if",
"(",
"this",
".",
"getMessageReceiver",
"(",
")",
"!=",
"null",
")",
"this",
".",
"getMessageReceiver",
"(",
")",
".",
"setNewFilterProperties",
... | Update this filter and the remote filter with this new key tree.
@param mxProperties New tree filter. | [
"Update",
"this",
"filter",
"and",
"the",
"remote",
"filter",
"with",
"this",
"new",
"key",
"tree",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/message/src/main/java/org/jbundle/thin/base/message/BaseMessageFilter.java#L487-L493 |
154,328 | js-lib-com/commons | src/main/java/js/io/FilesInputStream.java | FilesInputStream.getMeta | public <T> T getMeta(String key, Class<T> type) {
return ConverterRegistry.getConverter().asObject(getMeta(key), type);
} | java | public <T> T getMeta(String key, Class<T> type) {
return ConverterRegistry.getConverter().asObject(getMeta(key), type);
} | [
"public",
"<",
"T",
">",
"T",
"getMeta",
"(",
"String",
"key",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"return",
"ConverterRegistry",
".",
"getConverter",
"(",
")",
".",
"asObject",
"(",
"getMeta",
"(",
"key",
")",
",",
"type",
")",
";",
"}"... | Get files archive meta data converted to requested type.
@param key meta data key,
@param type type to convert meta data value to.
@param <T> meta data type.
@return meta data value converted to type.
@throws InvalidFilesArchiveException if requested meta data key does not exists. | [
"Get",
"files",
"archive",
"meta",
"data",
"converted",
"to",
"requested",
"type",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/io/FilesInputStream.java#L187-L189 |
154,329 | js-lib-com/commons | src/main/java/js/io/FilesInputStream.java | FilesInputStream.getMeta | public <T> T getMeta(String key, Class<T> type, T defaultValue) {
String value = manifest.getMainAttributes().getValue(key);
return value == null ? defaultValue : ConverterRegistry.getConverter().asObject(value, type);
} | java | public <T> T getMeta(String key, Class<T> type, T defaultValue) {
String value = manifest.getMainAttributes().getValue(key);
return value == null ? defaultValue : ConverterRegistry.getConverter().asObject(value, type);
} | [
"public",
"<",
"T",
">",
"T",
"getMeta",
"(",
"String",
"key",
",",
"Class",
"<",
"T",
">",
"type",
",",
"T",
"defaultValue",
")",
"{",
"String",
"value",
"=",
"manifest",
".",
"getMainAttributes",
"(",
")",
".",
"getValue",
"(",
"key",
")",
";",
"... | Get files archive meta data converted to requested type or default value if meta data key is missing.
@param key meta data key,
@param type type to convert meta data value to,
@param defaultValue default value returned if key not found.
@param <T> meta data type.
@return meta data value converted to type or default va... | [
"Get",
"files",
"archive",
"meta",
"data",
"converted",
"to",
"requested",
"type",
"or",
"default",
"value",
"if",
"meta",
"data",
"key",
"is",
"missing",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/io/FilesInputStream.java#L200-L203 |
154,330 | pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java | BaseFilterQueryBuilder.addSizeGreaterThanOrEqualToCondition | protected void addSizeGreaterThanOrEqualToCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().ge(propertySizeExpression, size));
... | java | protected void addSizeGreaterThanOrEqualToCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().ge(propertySizeExpression, size));
... | [
"protected",
"void",
"addSizeGreaterThanOrEqualToCondition",
"(",
"final",
"String",
"propertyName",
",",
"final",
"Integer",
"size",
")",
"{",
"final",
"Expression",
"<",
"Integer",
">",
"propertySizeExpression",
"=",
"getCriteriaBuilder",
"(",
")",
".",
"size",
"(... | Add a Field Search Condition that will check if the size of a collection in an entity is greater than or equal to the
specified size.
@param propertyName The name of the collection as defined in the Entity mapping class.
@param size The size that the collection should be greater than or equal to. | [
"Add",
"a",
"Field",
"Search",
"Condition",
"that",
"will",
"check",
"if",
"the",
"size",
"of",
"a",
"collection",
"in",
"an",
"entity",
"is",
"greater",
"than",
"or",
"equal",
"to",
"the",
"specified",
"size",
"."
] | 2bb23430adab956737d0301cd2ea933f986dd85b | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L247-L250 |
154,331 | pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java | BaseFilterQueryBuilder.addSizeGreaterThanCondition | protected void addSizeGreaterThanCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().gt(propertySizeExpression, size));
} | java | protected void addSizeGreaterThanCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().gt(propertySizeExpression, size));
} | [
"protected",
"void",
"addSizeGreaterThanCondition",
"(",
"final",
"String",
"propertyName",
",",
"final",
"Integer",
"size",
")",
"{",
"final",
"Expression",
"<",
"Integer",
">",
"propertySizeExpression",
"=",
"getCriteriaBuilder",
"(",
")",
".",
"size",
"(",
"get... | Add a Field Search Condition that will check if the size of a collection in an entity is greater than the specified size.
@param propertyName The name of the collection as defined in the Entity mapping class.
@param size The size that the collection should be greater than. | [
"Add",
"a",
"Field",
"Search",
"Condition",
"that",
"will",
"check",
"if",
"the",
"size",
"of",
"a",
"collection",
"in",
"an",
"entity",
"is",
"greater",
"than",
"the",
"specified",
"size",
"."
] | 2bb23430adab956737d0301cd2ea933f986dd85b | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L258-L261 |
154,332 | pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java | BaseFilterQueryBuilder.addSizeLessThanOrEqualToCondition | protected void addSizeLessThanOrEqualToCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().le(propertySizeExpression, size));
} | java | protected void addSizeLessThanOrEqualToCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().le(propertySizeExpression, size));
} | [
"protected",
"void",
"addSizeLessThanOrEqualToCondition",
"(",
"final",
"String",
"propertyName",
",",
"final",
"Integer",
"size",
")",
"{",
"final",
"Expression",
"<",
"Integer",
">",
"propertySizeExpression",
"=",
"getCriteriaBuilder",
"(",
")",
".",
"size",
"(",
... | Add a Field Search Condition that will check if the size of a collection in an entity is less than or equal to the
specified size.
@param propertyName The name of the collection as defined in the Entity mapping class.
@param size The size that the collection should be less than or equal to. | [
"Add",
"a",
"Field",
"Search",
"Condition",
"that",
"will",
"check",
"if",
"the",
"size",
"of",
"a",
"collection",
"in",
"an",
"entity",
"is",
"less",
"than",
"or",
"equal",
"to",
"the",
"specified",
"size",
"."
] | 2bb23430adab956737d0301cd2ea933f986dd85b | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L270-L273 |
154,333 | pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java | BaseFilterQueryBuilder.addSizeLessThanCondition | protected void addSizeLessThanCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().lt(propertySizeExpression, size));
} | java | protected void addSizeLessThanCondition(final String propertyName, final Integer size) {
final Expression<Integer> propertySizeExpression = getCriteriaBuilder().size(getRootPath().get(propertyName).as(Set.class));
fieldConditions.add(getCriteriaBuilder().lt(propertySizeExpression, size));
} | [
"protected",
"void",
"addSizeLessThanCondition",
"(",
"final",
"String",
"propertyName",
",",
"final",
"Integer",
"size",
")",
"{",
"final",
"Expression",
"<",
"Integer",
">",
"propertySizeExpression",
"=",
"getCriteriaBuilder",
"(",
")",
".",
"size",
"(",
"getRoo... | Add a Field Search Condition that will check if the size of a collection in an entity is less than the specified size.
@param propertyName The name of the collection as defined in the Entity mapping class.
@param size The size that the collection should be less than. | [
"Add",
"a",
"Field",
"Search",
"Condition",
"that",
"will",
"check",
"if",
"the",
"size",
"of",
"a",
"collection",
"in",
"an",
"entity",
"is",
"less",
"than",
"the",
"specified",
"size",
"."
] | 2bb23430adab956737d0301cd2ea933f986dd85b | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L281-L284 |
154,334 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.free | public void free()
{
int iOldEditMode = 0;
if (m_record != null) // First, release the record for this table
{
iOldEditMode = this.getRecord().getEditMode();
this.getRecord().setEditMode(iOldEditMode | DBConstants.EDIT_CLOSE_IN_FREE); // This is a cludge... signals... | java | public void free()
{
int iOldEditMode = 0;
if (m_record != null) // First, release the record for this table
{
iOldEditMode = this.getRecord().getEditMode();
this.getRecord().setEditMode(iOldEditMode | DBConstants.EDIT_CLOSE_IN_FREE); // This is a cludge... signals... | [
"public",
"void",
"free",
"(",
")",
"{",
"int",
"iOldEditMode",
"=",
"0",
";",
"if",
"(",
"m_record",
"!=",
"null",
")",
"// First, release the record for this table",
"{",
"iOldEditMode",
"=",
"this",
".",
"getRecord",
"(",
")",
".",
"getEditMode",
"(",
")"... | Free this table object.
Don't call this directly, freeing the record will free the table correctly.
You never know, another table may have been added to the table chain.
First, closes this table, then removes me from the database. | [
"Free",
"this",
"table",
"object",
".",
"Don",
"t",
"call",
"this",
"directly",
"freeing",
"the",
"record",
"will",
"free",
"the",
"table",
"correctly",
".",
"You",
"never",
"know",
"another",
"table",
"may",
"have",
"been",
"added",
"to",
"the",
"table",
... | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L144-L163 |
154,335 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.addListener | public void addListener(Record record, FileListener listener)
{
record.doAddListener(listener);
boolean bOldState = listener.setEnabledListener(false); // To disable recursive forever loop!
BaseListener nextListener = listener.setNextListener(null); // Make sure this is the ONLY lis... | java | public void addListener(Record record, FileListener listener)
{
record.doAddListener(listener);
boolean bOldState = listener.setEnabledListener(false); // To disable recursive forever loop!
BaseListener nextListener = listener.setNextListener(null); // Make sure this is the ONLY lis... | [
"public",
"void",
"addListener",
"(",
"Record",
"record",
",",
"FileListener",
"listener",
")",
"{",
"record",
".",
"doAddListener",
"(",
"listener",
")",
";",
"boolean",
"bOldState",
"=",
"listener",
".",
"setEnabledListener",
"(",
"false",
")",
";",
"// To d... | Adding a file listener to the chain.
This just gives the table an ability to respond to listeners being added.
@param record TODO
@param listener The filter or listener to add to the chain. | [
"Adding",
"a",
"file",
"listener",
"to",
"the",
"chain",
".",
"This",
"just",
"gives",
"the",
"table",
"an",
"ability",
"to",
"respond",
"to",
"listeners",
"being",
"added",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L188-L203 |
154,336 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.getPhysicalTable | private BaseTable getPhysicalTable(PassThruTable table, Record record)
{
BaseTable altTable = table.getNextTable();
if (altTable instanceof PassThruTable)
{
BaseTable physicalTable = getPhysicalTable((PassThruTable)altTable, record);
if (physicalTable != null)
if (physicalTable != altTable)
... | java | private BaseTable getPhysicalTable(PassThruTable table, Record record)
{
BaseTable altTable = table.getNextTable();
if (altTable instanceof PassThruTable)
{
BaseTable physicalTable = getPhysicalTable((PassThruTable)altTable, record);
if (physicalTable != null)
if (physicalTable != altTable)
... | [
"private",
"BaseTable",
"getPhysicalTable",
"(",
"PassThruTable",
"table",
",",
"Record",
"record",
")",
"{",
"BaseTable",
"altTable",
"=",
"table",
".",
"getNextTable",
"(",
")",
";",
"if",
"(",
"altTable",
"instanceof",
"PassThruTable",
")",
"{",
"BaseTable",
... | Dig down and get the physical table for this record.
@param table
@param record
@return | [
"Dig",
"down",
"and",
"get",
"the",
"physical",
"table",
"for",
"this",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L1231-L1261 |
154,337 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.doHasPrevious | public boolean doHasPrevious()
{
if ((m_iRecordStatus & DBConstants.RECORD_AT_BOF) != 0)
return false; // Already at BOF (can't be one before)
if ((m_iRecordStatus & DBConstants.RECORD_PREVIOUS_PENDING) != 0)
return true; // Already one waiting
boolean bAtBOF = tru... | java | public boolean doHasPrevious()
{
if ((m_iRecordStatus & DBConstants.RECORD_AT_BOF) != 0)
return false; // Already at BOF (can't be one before)
if ((m_iRecordStatus & DBConstants.RECORD_PREVIOUS_PENDING) != 0)
return true; // Already one waiting
boolean bAtBOF = tru... | [
"public",
"boolean",
"doHasPrevious",
"(",
")",
"{",
"if",
"(",
"(",
"m_iRecordStatus",
"&",
"DBConstants",
".",
"RECORD_AT_BOF",
")",
"!=",
"0",
")",
"return",
"false",
";",
"// Already at BOF (can't be one before)",
"if",
"(",
"(",
"m_iRecordStatus",
"&",
"DBC... | Is the first record in the file?
@return false if file position is at first record. | [
"Is",
"the",
"first",
"record",
"in",
"the",
"file?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L1367-L1391 |
154,338 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.isBOF | public boolean isBOF()
{
boolean bFlag = ((m_iRecordStatus & DBConstants.RECORD_AT_BOF) != 0);
if (this.isTable())
{ // If this is a table, it can't handle starting and ending keys.. do it manually
if (bFlag)
return bFlag;
if (this.getRecord().getKey... | java | public boolean isBOF()
{
boolean bFlag = ((m_iRecordStatus & DBConstants.RECORD_AT_BOF) != 0);
if (this.isTable())
{ // If this is a table, it can't handle starting and ending keys.. do it manually
if (bFlag)
return bFlag;
if (this.getRecord().getKey... | [
"public",
"boolean",
"isBOF",
"(",
")",
"{",
"boolean",
"bFlag",
"=",
"(",
"(",
"m_iRecordStatus",
"&",
"DBConstants",
".",
"RECORD_AT_BOF",
")",
"!=",
"0",
")",
";",
"if",
"(",
"this",
".",
"isTable",
"(",
")",
")",
"{",
"// If this is a table, it can't h... | Is the record at the Start of the file?
@return true if file position is one before the first record. | [
"Is",
"the",
"record",
"at",
"the",
"Start",
"of",
"the",
"file?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L1396-L1412 |
154,339 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.doHasNext | public boolean doHasNext() throws DBException
{
if ((m_iRecordStatus & DBConstants.RECORD_AT_EOF) != 0)
return false; // Already at EOF, can't be one after
if ((m_iRecordStatus & DBConstants.RECORD_NEXT_PENDING) != 0)
return true; // Already one waiting
boolean bAt... | java | public boolean doHasNext() throws DBException
{
if ((m_iRecordStatus & DBConstants.RECORD_AT_EOF) != 0)
return false; // Already at EOF, can't be one after
if ((m_iRecordStatus & DBConstants.RECORD_NEXT_PENDING) != 0)
return true; // Already one waiting
boolean bAt... | [
"public",
"boolean",
"doHasNext",
"(",
")",
"throws",
"DBException",
"{",
"if",
"(",
"(",
"m_iRecordStatus",
"&",
"DBConstants",
".",
"RECORD_AT_EOF",
")",
"!=",
"0",
")",
"return",
"false",
";",
"// Already at EOF, can't be one after",
"if",
"(",
"(",
"m_iRecor... | Is the last record in the file?
@return false if file position is at last record. | [
"Is",
"the",
"last",
"record",
"in",
"the",
"file?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L1425-L1455 |
154,340 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.isEOF | public boolean isEOF()
{
boolean bFlag = ((m_iRecordStatus & DBConstants.RECORD_AT_EOF) != 0);
if (this.isTable())
{ // If this is a table, it can't handle starting and ending keys.. do it manually
if (bFlag)
return bFlag;
if (this.getRecord().getKey... | java | public boolean isEOF()
{
boolean bFlag = ((m_iRecordStatus & DBConstants.RECORD_AT_EOF) != 0);
if (this.isTable())
{ // If this is a table, it can't handle starting and ending keys.. do it manually
if (bFlag)
return bFlag;
if (this.getRecord().getKey... | [
"public",
"boolean",
"isEOF",
"(",
")",
"{",
"boolean",
"bFlag",
"=",
"(",
"(",
"m_iRecordStatus",
"&",
"DBConstants",
".",
"RECORD_AT_EOF",
")",
"!=",
"0",
")",
";",
"if",
"(",
"this",
".",
"isTable",
"(",
")",
")",
"{",
"// If this is a table, it can't h... | Is the record at the End of the file?
@return true if file position is one after the last record. | [
"Is",
"the",
"record",
"at",
"the",
"End",
"of",
"the",
"file?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L1460-L1476 |
154,341 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.unlockIfLocked | public boolean unlockIfLocked(Record record, Object bookmark) throws DBException
{
if (record != null)
{ // unlock record
BaseApplication app = null;
org.jbundle.model.Task task = null;
if (record.getRecordOwner() != null)
task = record.getRecord... | java | public boolean unlockIfLocked(Record record, Object bookmark) throws DBException
{
if (record != null)
{ // unlock record
BaseApplication app = null;
org.jbundle.model.Task task = null;
if (record.getRecordOwner() != null)
task = record.getRecord... | [
"public",
"boolean",
"unlockIfLocked",
"(",
"Record",
"record",
",",
"Object",
"bookmark",
")",
"throws",
"DBException",
"{",
"if",
"(",
"record",
"!=",
"null",
")",
"{",
"// unlock record",
"BaseApplication",
"app",
"=",
"null",
";",
"org",
".",
"jbundle",
... | Unlock this record if it is locked.
@param record The record to unlock.
@param The bookmark to unlock (all if null).
@return true if successful (it is usually okay to ignore this return). | [
"Unlock",
"this",
"record",
"if",
"it",
"is",
"locked",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L1561-L1579 |
154,342 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/BaseTable.java | BaseTable.getProperties | public Map<String, Object> getProperties()
{
if (this.getRecord() != null)
if (((this.getRecord().getDatabaseType() & DBConstants.MAPPED) != 0)
|| ((this.getRecord().getDatabaseType() & DBConstants.REMOTE_MEMORY) != 0))
{
if (m_properties == null)
... | java | public Map<String, Object> getProperties()
{
if (this.getRecord() != null)
if (((this.getRecord().getDatabaseType() & DBConstants.MAPPED) != 0)
|| ((this.getRecord().getDatabaseType() & DBConstants.REMOTE_MEMORY) != 0))
{
if (m_properties == null)
... | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getProperties",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getRecord",
"(",
")",
"!=",
"null",
")",
"if",
"(",
"(",
"(",
"this",
".",
"getRecord",
"(",
")",
".",
"getDatabaseType",
"(",
")",
"&",
... | Get this property for this table.
@param strProperty The property key.
@return The property value. | [
"Get",
"this",
"property",
"for",
"this",
"table",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/BaseTable.java#L1615-L1626 |
154,343 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/convert/QueryBitmapConverter.java | QueryBitmapConverter.setupDefaultView | public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties)
{
properties = new HashMap<String,Object>();
properties.put(ScreenModel.COMMAND, MenuConstants.FORMLINK);
properties.put(Scre... | java | public ScreenComponent setupDefaultView(ScreenLoc itsLocation, ComponentParent targetScreen, Convert converter, int iDisplayFieldDesc, Map<String, Object> properties)
{
properties = new HashMap<String,Object>();
properties.put(ScreenModel.COMMAND, MenuConstants.FORMLINK);
properties.put(Scre... | [
"public",
"ScreenComponent",
"setupDefaultView",
"(",
"ScreenLoc",
"itsLocation",
",",
"ComponentParent",
"targetScreen",
",",
"Convert",
"converter",
",",
"int",
"iDisplayFieldDesc",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
")",
"{",
"properties... | Set up the default control for this field.
A SCannedBox for a query bitmap converter.
@param itsLocation Location of this component on screen (ie., GridBagConstraint).
@param targetScreen Where to place this component (ie., Parent screen or GridBagLayout).
@param iDisplayFieldDesc Display the label? (optional... | [
"Set",
"up",
"the",
"default",
"control",
"for",
"this",
"field",
".",
"A",
"SCannedBox",
"for",
"a",
"query",
"bitmap",
"converter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/QueryBitmapConverter.java#L115-L121 |
154,344 | tvesalainen/util | util/src/main/java/org/vesalainen/nio/channels/FilterChannel.java | FilterChannel.position | @Override
public FilterChannel position(long newPosition) throws IOException
{
if (!isOpen())
{
throw new ClosedChannelException();
}
int skip = (int) (newPosition - position());
if (skip < 0)
{
throw new UnsupportedOperationExcep... | java | @Override
public FilterChannel position(long newPosition) throws IOException
{
if (!isOpen())
{
throw new ClosedChannelException();
}
int skip = (int) (newPosition - position());
if (skip < 0)
{
throw new UnsupportedOperationExcep... | [
"@",
"Override",
"public",
"FilterChannel",
"position",
"(",
"long",
"newPosition",
")",
"throws",
"IOException",
"{",
"if",
"(",
"!",
"isOpen",
"(",
")",
")",
"{",
"throw",
"new",
"ClosedChannelException",
"(",
")",
";",
"}",
"int",
"skip",
"=",
"(",
"i... | Changes unfiltered position. Only forward direction is allowed with
small skips. This method is for alignment purposes mostly.
@param newPosition
@return
@throws IOException | [
"Changes",
"unfiltered",
"position",
".",
"Only",
"forward",
"direction",
"is",
"allowed",
"with",
"small",
"skips",
".",
"This",
"method",
"is",
"for",
"alignment",
"purposes",
"mostly",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/nio/channels/FilterChannel.java#L125-L159 |
154,345 | biouno/figshare-java-api | src/main/java/org/biouno/figshare/FigShareClient.java | FigShareClient.getURL | private String getURL(String endpoint, int version, String method) {
StringBuilder sb = new StringBuilder();
sb.append(endpoint);
if (!endpoint.endsWith(FORWARD_SLASH)) {
sb.append(FORWARD_SLASH);
}
sb.append(VERSION_PREFIX + version + FORWARD_SLASH + method);
... | java | private String getURL(String endpoint, int version, String method) {
StringBuilder sb = new StringBuilder();
sb.append(endpoint);
if (!endpoint.endsWith(FORWARD_SLASH)) {
sb.append(FORWARD_SLASH);
}
sb.append(VERSION_PREFIX + version + FORWARD_SLASH + method);
... | [
"private",
"String",
"getURL",
"(",
"String",
"endpoint",
",",
"int",
"version",
",",
"String",
"method",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"endpoint",
")",
";",
"if",
"(",
"!",
"endp... | Create the FigShare API URL using the endpoint, version and API method.
@param endpoint endpoint URL
@param version API version
@param method API operation
@return the URL with the version and method | [
"Create",
"the",
"FigShare",
"API",
"URL",
"using",
"the",
"endpoint",
"version",
"and",
"API",
"method",
"."
] | 6d447764efe8fa4329d15e339a8601351aade93c | https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L132-L140 |
154,346 | biouno/figshare-java-api | src/main/java/org/biouno/figshare/FigShareClient.java | FigShareClient.to | public static FigShareClient to(String endpoint, int version, String clientKey, String clientSecret,
String tokenKey, String tokenSecret) {
return new FigShareClient(endpoint, version, clientKey, clientSecret, tokenKey, tokenSecret);
} | java | public static FigShareClient to(String endpoint, int version, String clientKey, String clientSecret,
String tokenKey, String tokenSecret) {
return new FigShareClient(endpoint, version, clientKey, clientSecret, tokenKey, tokenSecret);
} | [
"public",
"static",
"FigShareClient",
"to",
"(",
"String",
"endpoint",
",",
"int",
"version",
",",
"String",
"clientKey",
",",
"String",
"clientSecret",
",",
"String",
"tokenKey",
",",
"String",
"tokenSecret",
")",
"{",
"return",
"new",
"FigShareClient",
"(",
... | Create a FigShareClient to interface to the FigShare API.
@param endpoint API endpoint
@param version API version
@param clientKey OAuth client key
@param clientSecret OAuth client secret
@param tokenKey OAuth token key
@param tokenSecret OAuth token secret
@return a {@link FigShareClient} | [
"Create",
"a",
"FigShareClient",
"to",
"interface",
"to",
"the",
"FigShare",
"API",
"."
] | 6d447764efe8fa4329d15e339a8601351aade93c | https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L153-L156 |
154,347 | biouno/figshare-java-api | src/main/java/org/biouno/figshare/FigShareClient.java | FigShareClient.readArticlesFromJson | protected List<Article> readArticlesFromJson(String json) {
Gson gson = new Gson();
JsonParser parser = new JsonParser();
JsonObject array = parser.parse(json).getAsJsonObject();
JsonElement items = array.get("items");
JsonArray itemsArray = items.getAsJsonArray();
List<A... | java | protected List<Article> readArticlesFromJson(String json) {
Gson gson = new Gson();
JsonParser parser = new JsonParser();
JsonObject array = parser.parse(json).getAsJsonObject();
JsonElement items = array.get("items");
JsonArray itemsArray = items.getAsJsonArray();
List<A... | [
"protected",
"List",
"<",
"Article",
">",
"readArticlesFromJson",
"(",
"String",
"json",
")",
"{",
"Gson",
"gson",
"=",
"new",
"Gson",
"(",
")",
";",
"JsonParser",
"parser",
"=",
"new",
"JsonParser",
"(",
")",
";",
"JsonObject",
"array",
"=",
"parser",
"... | Get the articles objects from JSON.
@param json JSON
@return articles objects | [
"Get",
"the",
"articles",
"objects",
"from",
"JSON",
"."
] | 6d447764efe8fa4329d15e339a8601351aade93c | https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L204-L216 |
154,348 | biouno/figshare-java-api | src/main/java/org/biouno/figshare/FigShareClient.java | FigShareClient.createArticle | public Article createArticle(final String title, final String description, final String definedType) {
HttpClient httpClient = null;
try {
final String method = "my_data/articles";
// create an HTTP request to a protected resource
final String url = getURL(endpoint, v... | java | public Article createArticle(final String title, final String description, final String definedType) {
HttpClient httpClient = null;
try {
final String method = "my_data/articles";
// create an HTTP request to a protected resource
final String url = getURL(endpoint, v... | [
"public",
"Article",
"createArticle",
"(",
"final",
"String",
"title",
",",
"final",
"String",
"description",
",",
"final",
"String",
"definedType",
")",
"{",
"HttpClient",
"httpClient",
"=",
"null",
";",
"try",
"{",
"final",
"String",
"method",
"=",
"\"my_dat... | Create an article.
@param title title
@param description description
@param definedType defined type (e.g. dataset)
@return an {@link Article} | [
"Create",
"an",
"article",
"."
] | 6d447764efe8fa4329d15e339a8601351aade93c | https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L226-L265 |
154,349 | biouno/figshare-java-api | src/main/java/org/biouno/figshare/FigShareClient.java | FigShareClient.readArticleFromJson | protected Article readArticleFromJson(String json) {
Gson gson = new Gson();
Article article = gson.fromJson(json, Article.class);
return article;
} | java | protected Article readArticleFromJson(String json) {
Gson gson = new Gson();
Article article = gson.fromJson(json, Article.class);
return article;
} | [
"protected",
"Article",
"readArticleFromJson",
"(",
"String",
"json",
")",
"{",
"Gson",
"gson",
"=",
"new",
"Gson",
"(",
")",
";",
"Article",
"article",
"=",
"gson",
".",
"fromJson",
"(",
"json",
",",
"Article",
".",
"class",
")",
";",
"return",
"article... | Get the article object from JSON.
@param json JSON
@return article object | [
"Get",
"the",
"article",
"object",
"from",
"JSON",
"."
] | 6d447764efe8fa4329d15e339a8601351aade93c | https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L273-L277 |
154,350 | biouno/figshare-java-api | src/main/java/org/biouno/figshare/FigShareClient.java | FigShareClient.uploadFile | public org.biouno.figshare.v1.model.File uploadFile(long articleId, File file) {
HttpClient httpClient = null;
try {
final String method = String.format("my_data/articles/%d/files", articleId);
// create an HTTP request to a protected resource
final String url = getUR... | java | public org.biouno.figshare.v1.model.File uploadFile(long articleId, File file) {
HttpClient httpClient = null;
try {
final String method = String.format("my_data/articles/%d/files", articleId);
// create an HTTP request to a protected resource
final String url = getUR... | [
"public",
"org",
".",
"biouno",
".",
"figshare",
".",
"v1",
".",
"model",
".",
"File",
"uploadFile",
"(",
"long",
"articleId",
",",
"File",
"file",
")",
"{",
"HttpClient",
"httpClient",
"=",
"null",
";",
"try",
"{",
"final",
"String",
"method",
"=",
"S... | Upload a file to an article.
@param articleId article ID
@param file java.io.File file
@return org.biouno.figshare.v1.model.File uploaded file, without the thumbnail URL | [
"Upload",
"a",
"file",
"to",
"an",
"article",
"."
] | 6d447764efe8fa4329d15e339a8601351aade93c | https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L286-L324 |
154,351 | biouno/figshare-java-api | src/main/java/org/biouno/figshare/FigShareClient.java | FigShareClient.readFileFromJson | protected org.biouno.figshare.v1.model.File readFileFromJson(String json) {
Gson gson = new Gson();
org.biouno.figshare.v1.model.File file = gson.fromJson(json, org.biouno.figshare.v1.model.File.class);
return file;
} | java | protected org.biouno.figshare.v1.model.File readFileFromJson(String json) {
Gson gson = new Gson();
org.biouno.figshare.v1.model.File file = gson.fromJson(json, org.biouno.figshare.v1.model.File.class);
return file;
} | [
"protected",
"org",
".",
"biouno",
".",
"figshare",
".",
"v1",
".",
"model",
".",
"File",
"readFileFromJson",
"(",
"String",
"json",
")",
"{",
"Gson",
"gson",
"=",
"new",
"Gson",
"(",
")",
";",
"org",
".",
"biouno",
".",
"figshare",
".",
"v1",
".",
... | Get a file from a JSON.
@param json JSON
@return a file | [
"Get",
"a",
"file",
"from",
"a",
"JSON",
"."
] | 6d447764efe8fa4329d15e339a8601351aade93c | https://github.com/biouno/figshare-java-api/blob/6d447764efe8fa4329d15e339a8601351aade93c/src/main/java/org/biouno/figshare/FigShareClient.java#L332-L336 |
154,352 | microfocus-idol/java-content-parameter-api | src/main/java/com/hp/autonomy/aci/content/identifier/id/Id.java | Id.compareTo | @Override
public int compareTo(final Id id) {
return Integer.valueOf(this.id).compareTo(id.id);
} | java | @Override
public int compareTo(final Id id) {
return Integer.valueOf(this.id).compareTo(id.id);
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"final",
"Id",
"id",
")",
"{",
"return",
"Integer",
".",
"valueOf",
"(",
"this",
".",
"id",
")",
".",
"compareTo",
"(",
"id",
".",
"id",
")",
";",
"}"
] | Provides a natural ordering for the Id class such that Ids can be sorted into increasing numerical order.
@param id An id object for comparision
@return {@code -1}, {@code 0} or {@code 1} | [
"Provides",
"a",
"natural",
"ordering",
"for",
"the",
"Id",
"class",
"such",
"that",
"Ids",
"can",
"be",
"sorted",
"into",
"increasing",
"numerical",
"order",
"."
] | 8d33dc633f8df2a470a571ac7694e423e7004ad0 | https://github.com/microfocus-idol/java-content-parameter-api/blob/8d33dc633f8df2a470a571ac7694e423e7004ad0/src/main/java/com/hp/autonomy/aci/content/identifier/id/Id.java#L77-L80 |
154,353 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.modifiedNow | public final Post modifiedNow() {
return new Post(id, slug, title, excerpt, content, authorId, author,
publishTimestamp, System.currentTimeMillis(), status, parentId,
guid, commentCount, metadata, type, mimeType, taxonomyTerms, children);
} | java | public final Post modifiedNow() {
return new Post(id, slug, title, excerpt, content, authorId, author,
publishTimestamp, System.currentTimeMillis(), status, parentId,
guid, commentCount, metadata, type, mimeType, taxonomyTerms, children);
} | [
"public",
"final",
"Post",
"modifiedNow",
"(",
")",
"{",
"return",
"new",
"Post",
"(",
"id",
",",
"slug",
",",
"title",
",",
"excerpt",
",",
"content",
",",
"authorId",
",",
"author",
",",
"publishTimestamp",
",",
"System",
".",
"currentTimeMillis",
"(",
... | Changes the modified time of a post to the current time.
@return The post with modified time set to the current time. | [
"Changes",
"the",
"modified",
"time",
"of",
"a",
"post",
"to",
"the",
"current",
"time",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L685-L689 |
154,354 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.withContent | public final Post withContent(final String content) {
return new Post(id, slug, title, excerpt, content, authorId, author,
publishTimestamp, modifiedTimestamp, status, parentId,
guid, commentCount, metadata, type, mimeType, taxonomyTerms, children);
} | java | public final Post withContent(final String content) {
return new Post(id, slug, title, excerpt, content, authorId, author,
publishTimestamp, modifiedTimestamp, status, parentId,
guid, commentCount, metadata, type, mimeType, taxonomyTerms, children);
} | [
"public",
"final",
"Post",
"withContent",
"(",
"final",
"String",
"content",
")",
"{",
"return",
"new",
"Post",
"(",
"id",
",",
"slug",
",",
"title",
",",
"excerpt",
",",
"content",
",",
"authorId",
",",
"author",
",",
"publishTimestamp",
",",
"modifiedTim... | Replaces post content.
@param content The new content.
@return The post with content replaced. | [
"Replaces",
"post",
"content",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L696-L700 |
154,355 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.withAuthor | public final Post withAuthor(final User user) {
return new Post(id, slug, title, excerpt, content, authorId, user,
publishTimestamp, modifiedTimestamp, status, parentId,
guid, commentCount, metadata, type, mimeType, taxonomyTerms, children);
} | java | public final Post withAuthor(final User user) {
return new Post(id, slug, title, excerpt, content, authorId, user,
publishTimestamp, modifiedTimestamp, status, parentId,
guid, commentCount, metadata, type, mimeType, taxonomyTerms, children);
} | [
"public",
"final",
"Post",
"withAuthor",
"(",
"final",
"User",
"user",
")",
"{",
"return",
"new",
"Post",
"(",
"id",
",",
"slug",
",",
"title",
",",
"excerpt",
",",
"content",
",",
"authorId",
",",
"user",
",",
"publishTimestamp",
",",
"modifiedTimestamp",... | Adds an author to a post.
@param user The user that represents the author.
@return The post with author added. | [
"Adds",
"an",
"author",
"to",
"a",
"post",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L729-L733 |
154,356 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.withTaxonomyTerms | public final Post withTaxonomyTerms(final Map<String, List<TaxonomyTerm>> taxonomyTerms) {
ImmutableMap.Builder<String, ImmutableList<TaxonomyTerm>> builder = ImmutableMap.builder();
if(taxonomyTerms != null && taxonomyTerms.size() > 0) {
taxonomyTerms.entrySet().forEach(kv -> builder.put(kv.getKey... | java | public final Post withTaxonomyTerms(final Map<String, List<TaxonomyTerm>> taxonomyTerms) {
ImmutableMap.Builder<String, ImmutableList<TaxonomyTerm>> builder = ImmutableMap.builder();
if(taxonomyTerms != null && taxonomyTerms.size() > 0) {
taxonomyTerms.entrySet().forEach(kv -> builder.put(kv.getKey... | [
"public",
"final",
"Post",
"withTaxonomyTerms",
"(",
"final",
"Map",
"<",
"String",
",",
"List",
"<",
"TaxonomyTerm",
">",
">",
"taxonomyTerms",
")",
"{",
"ImmutableMap",
".",
"Builder",
"<",
"String",
",",
"ImmutableList",
"<",
"TaxonomyTerm",
">",
">",
"bu... | Adds taxonomy terms to a post.
@param taxonomyTerms The taxonomy terms.
@return The post with taxonomy terms added. | [
"Adds",
"taxonomy",
"terms",
"to",
"a",
"post",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L740-L748 |
154,357 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.withChildren | public final Post withChildren(final List<Post> children) {
return new Post(id, slug, title, excerpt, content, authorId, author,
publishTimestamp, modifiedTimestamp, status, parentId,
guid, commentCount, this.metadata, type, mimeType, taxonomyTerms,
children != null ? Imm... | java | public final Post withChildren(final List<Post> children) {
return new Post(id, slug, title, excerpt, content, authorId, author,
publishTimestamp, modifiedTimestamp, status, parentId,
guid, commentCount, this.metadata, type, mimeType, taxonomyTerms,
children != null ? Imm... | [
"public",
"final",
"Post",
"withChildren",
"(",
"final",
"List",
"<",
"Post",
">",
"children",
")",
"{",
"return",
"new",
"Post",
"(",
"id",
",",
"slug",
",",
"title",
",",
"excerpt",
",",
"content",
",",
"authorId",
",",
"author",
",",
"publishTimestamp... | Adds children to a post.
@param children The children to add.
@return The post with children added. | [
"Adds",
"children",
"to",
"a",
"post",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L766-L771 |
154,358 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.terms | public final ImmutableList<TaxonomyTerm> terms(final String taxonomy) {
ImmutableList<TaxonomyTerm> terms = taxonomyTerms.get(taxonomy);
return terms != null ? terms : ImmutableList.of();
} | java | public final ImmutableList<TaxonomyTerm> terms(final String taxonomy) {
ImmutableList<TaxonomyTerm> terms = taxonomyTerms.get(taxonomy);
return terms != null ? terms : ImmutableList.of();
} | [
"public",
"final",
"ImmutableList",
"<",
"TaxonomyTerm",
">",
"terms",
"(",
"final",
"String",
"taxonomy",
")",
"{",
"ImmutableList",
"<",
"TaxonomyTerm",
">",
"terms",
"=",
"taxonomyTerms",
".",
"get",
"(",
"taxonomy",
")",
";",
"return",
"terms",
"!=",
"nu... | An immutable list of terms associated with this post from a specified taxonomy.
@param taxonomy The taxonomy.
@return The list of terms. | [
"An",
"immutable",
"list",
"of",
"terms",
"associated",
"with",
"this",
"post",
"from",
"a",
"specified",
"taxonomy",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L892-L895 |
154,359 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.tags | public final ImmutableList<TaxonomyTerm> tags() {
ImmutableList<TaxonomyTerm> tags = taxonomyTerms.get(TAG_TAXONOMY);
return tags != null ? tags : ImmutableList.of();
} | java | public final ImmutableList<TaxonomyTerm> tags() {
ImmutableList<TaxonomyTerm> tags = taxonomyTerms.get(TAG_TAXONOMY);
return tags != null ? tags : ImmutableList.of();
} | [
"public",
"final",
"ImmutableList",
"<",
"TaxonomyTerm",
">",
"tags",
"(",
")",
"{",
"ImmutableList",
"<",
"TaxonomyTerm",
">",
"tags",
"=",
"taxonomyTerms",
".",
"get",
"(",
"TAG_TAXONOMY",
")",
";",
"return",
"tags",
"!=",
"null",
"?",
"tags",
":",
"Immu... | An immutable list of tags associated with this post.
@return The list of tags. | [
"An",
"immutable",
"list",
"of",
"tags",
"associated",
"with",
"this",
"post",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L902-L905 |
154,360 | attribyte/wpdb | src/main/java/org/attribyte/wp/model/Post.java | Post.categories | public final ImmutableList<TaxonomyTerm> categories() {
ImmutableList<TaxonomyTerm> categories = taxonomyTerms.get(CATEGORY_TAXONOMY);
return categories != null ? categories : ImmutableList.of();
} | java | public final ImmutableList<TaxonomyTerm> categories() {
ImmutableList<TaxonomyTerm> categories = taxonomyTerms.get(CATEGORY_TAXONOMY);
return categories != null ? categories : ImmutableList.of();
} | [
"public",
"final",
"ImmutableList",
"<",
"TaxonomyTerm",
">",
"categories",
"(",
")",
"{",
"ImmutableList",
"<",
"TaxonomyTerm",
">",
"categories",
"=",
"taxonomyTerms",
".",
"get",
"(",
"CATEGORY_TAXONOMY",
")",
";",
"return",
"categories",
"!=",
"null",
"?",
... | An immutable list of categories associated with this post.
@return The list of categories. | [
"An",
"immutable",
"list",
"of",
"categories",
"associated",
"with",
"this",
"post",
"."
] | b9adf6131dfb67899ebff770c9bfeb001cc42f30 | https://github.com/attribyte/wpdb/blob/b9adf6131dfb67899ebff770c9bfeb001cc42f30/src/main/java/org/attribyte/wp/model/Post.java#L911-L914 |
154,361 | inkstand-io/scribble | scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java | HttpServerBuilder.contentFrom | public HttpServerBuilder contentFrom(String contextRoot, String contentResource){
URL resource = resolver.resolve(contentResource,CallStack.getCallerClass());
resources.put(contextRoot, resource);
return this;
} | java | public HttpServerBuilder contentFrom(String contextRoot, String contentResource){
URL resource = resolver.resolve(contentResource,CallStack.getCallerClass());
resources.put(contextRoot, resource);
return this;
} | [
"public",
"HttpServerBuilder",
"contentFrom",
"(",
"String",
"contextRoot",
",",
"String",
"contentResource",
")",
"{",
"URL",
"resource",
"=",
"resolver",
".",
"resolve",
"(",
"contentResource",
",",
"CallStack",
".",
"getCallerClass",
"(",
")",
")",
";",
"reso... | Defines a ZIP resource on the classpath that provides the static content the server should host.
@param contextRoot
the root path to the content
@param contentResource
the name of the classpath resource denoting a file that should be hosted. If the file denotes a zip file, its
content is hosted instead of the file itse... | [
"Defines",
"a",
"ZIP",
"resource",
"on",
"the",
"classpath",
"that",
"provides",
"the",
"static",
"content",
"the",
"server",
"should",
"host",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java#L86-L90 |
154,362 | inkstand-io/scribble | scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java | HttpServerBuilder.contentFrom | public HttpServerBuilder contentFrom(final String contextRoot, final TemporaryFolder folder) {
resources.put(contextRoot, folder);
return this;
} | java | public HttpServerBuilder contentFrom(final String contextRoot, final TemporaryFolder folder) {
resources.put(contextRoot, folder);
return this;
} | [
"public",
"HttpServerBuilder",
"contentFrom",
"(",
"final",
"String",
"contextRoot",
",",
"final",
"TemporaryFolder",
"folder",
")",
"{",
"resources",
".",
"put",
"(",
"contextRoot",
",",
"folder",
")",
";",
"return",
"this",
";",
"}"
] | Defines a folder resource whose content fill be hosted
rule.
@param contextRoot
the root path to the content
@param folder
the rule that creates the temporary folder that should be hosted by the http server.
@return
this builder | [
"Defines",
"a",
"folder",
"resource",
"whose",
"content",
"fill",
"be",
"hosted",
"rule",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java#L119-L122 |
154,363 | inkstand-io/scribble | scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java | HttpServerBuilder.contentFrom | public HttpServerBuilder contentFrom(final String path, final URL resource) {
resources.put(path, resource);
return this;
} | java | public HttpServerBuilder contentFrom(final String path, final URL resource) {
resources.put(path, resource);
return this;
} | [
"public",
"HttpServerBuilder",
"contentFrom",
"(",
"final",
"String",
"path",
",",
"final",
"URL",
"resource",
")",
"{",
"resources",
".",
"put",
"(",
"path",
",",
"resource",
")",
";",
"return",
"this",
";",
"}"
] | Defines a file to be hosted on the specified path. The file's content is provided by the specified URL.
@param path
the path where the file is accessible from the server
@param resource
the resource providing the content for the file
@return
this builder | [
"Defines",
"a",
"file",
"to",
"be",
"hosted",
"on",
"the",
"specified",
"path",
".",
"The",
"file",
"s",
"content",
"is",
"provided",
"by",
"the",
"specified",
"URL",
"."
] | 66e67553bad4b1ff817e1715fd1d3dd833406744 | https://github.com/inkstand-io/scribble/blob/66e67553bad4b1ff817e1715fd1d3dd833406744/scribble-http/src/main/java/io/inkstand/scribble/http/rules/HttpServerBuilder.java#L133-L136 |
154,364 | jbundle/jbundle | thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java | Splash.main | public static void main(String[] args)
{
String splashImage = Splash.getParam(args, SPLASH);
if ((splashImage == null) || (splashImage.length() == 0))
splashImage = DEFAULT_SPLASH;
URL url = Splash.class.getResource(splashImage);
if (url == null)
if (ClassServ... | java | public static void main(String[] args)
{
String splashImage = Splash.getParam(args, SPLASH);
if ((splashImage == null) || (splashImage.length() == 0))
splashImage = DEFAULT_SPLASH;
URL url = Splash.class.getResource(splashImage);
if (url == null)
if (ClassServ... | [
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"String",
"splashImage",
"=",
"Splash",
".",
"getParam",
"(",
"args",
",",
"SPLASH",
")",
";",
"if",
"(",
"(",
"splashImage",
"==",
"null",
")",
"||",
"(",
"splashImage",
... | Display splash, and launch app.
@param args the command line arguments | [
"Display",
"splash",
"and",
"launch",
"app",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java#L68-L87 |
154,365 | jbundle/jbundle | thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java | Splash.paint | public void paint(Graphics g)
{
g.drawImage(image, 0, 0, this);
// Notify method splash that the window has been painted.
if (! paintCalled) {
paintCalled = true;
synchronized (this)
{
notifyAll();
}
}
} | java | public void paint(Graphics g)
{
g.drawImage(image, 0, 0, this);
// Notify method splash that the window has been painted.
if (! paintCalled) {
paintCalled = true;
synchronized (this)
{
notifyAll();
}
}
} | [
"public",
"void",
"paint",
"(",
"Graphics",
"g",
")",
"{",
"g",
".",
"drawImage",
"(",
"image",
",",
"0",
",",
"0",
",",
"this",
")",
";",
"// Notify method splash that the window has been painted.",
"if",
"(",
"!",
"paintCalled",
")",
"{",
"paintCalled",
"=... | Paints the image on the window. | [
"Paints",
"the",
"image",
"on",
"the",
"window",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java#L161-L173 |
154,366 | jbundle/jbundle | thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java | Splash.disposeSplash | public static void disposeSplash() {
if (instance != null) {
Container container = instance;
while ((container = container.getParent()) != null)
{
if (container instanceof Window)
((Window)container).dispose();
}
ins... | java | public static void disposeSplash() {
if (instance != null) {
Container container = instance;
while ((container = container.getParent()) != null)
{
if (container instanceof Window)
((Window)container).dispose();
}
ins... | [
"public",
"static",
"void",
"disposeSplash",
"(",
")",
"{",
"if",
"(",
"instance",
"!=",
"null",
")",
"{",
"Container",
"container",
"=",
"instance",
";",
"while",
"(",
"(",
"container",
"=",
"container",
".",
"getParent",
"(",
")",
")",
"!=",
"null",
... | Closes the splash window. | [
"Closes",
"the",
"splash",
"window",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java#L238-L248 |
154,367 | jbundle/jbundle | thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java | Splash.invokeMain | public static void invokeMain(String className, String[] args) {
try {
Class<?> clazz = null;
if (ClassServiceUtility.getClassService().getClassFinder(null) != null)
clazz = ClassServiceUtility.getClassService().getClassFinder(null).findClass(className, null);
... | java | public static void invokeMain(String className, String[] args) {
try {
Class<?> clazz = null;
if (ClassServiceUtility.getClassService().getClassFinder(null) != null)
clazz = ClassServiceUtility.getClassService().getClassFinder(null).findClass(className, null);
... | [
"public",
"static",
"void",
"invokeMain",
"(",
"String",
"className",
",",
"String",
"[",
"]",
"args",
")",
"{",
"try",
"{",
"Class",
"<",
"?",
">",
"clazz",
"=",
"null",
";",
"if",
"(",
"ClassServiceUtility",
".",
"getClassService",
"(",
")",
".",
"ge... | Invokes the main method of the provided class name.
@param args the command line arguments | [
"Invokes",
"the",
"main",
"method",
"of",
"the",
"provided",
"class",
"name",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/splash/src/main/java/org/jbundle/thin/base/screen/splash/Splash.java#L254-L268 |
154,368 | tvesalainen/util | util/src/main/java/org/vesalainen/math/Polygon.java | Polygon.isInside | public boolean isInside(double testx, double testy)
{
if (!bounds.isInside(testx, testy))
{
return false;
}
return isRawHit(points, testx, testy);
} | java | public boolean isInside(double testx, double testy)
{
if (!bounds.isInside(testx, testy))
{
return false;
}
return isRawHit(points, testx, testy);
} | [
"public",
"boolean",
"isInside",
"(",
"double",
"testx",
",",
"double",
"testy",
")",
"{",
"if",
"(",
"!",
"bounds",
".",
"isInside",
"(",
"testx",
",",
"testy",
")",
")",
"{",
"return",
"false",
";",
"}",
"return",
"isRawHit",
"(",
"points",
",",
"t... | Returns true if point is inside a polygon.
@param testx
@param testy
@return
@see <a href="http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html">PNPOLY - Point Inclusion in Polygon Test W. Randolph Franklin (WRF)</a> | [
"Returns",
"true",
"if",
"point",
"is",
"inside",
"a",
"polygon",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/Polygon.java#L72-L79 |
154,369 | tvesalainen/util | util/src/main/java/org/vesalainen/math/Polygon.java | Polygon.isConvex | public static boolean isConvex(double[] data, int points)
{
if (points < 3)
{
return true;
}
for (int i1 = 0; i1 < points; i1++)
{
int i2 = (i1 + 1) % points;
int i3 = (i2 + 1) % points;
double x1 = data[2 * i1];
... | java | public static boolean isConvex(double[] data, int points)
{
if (points < 3)
{
return true;
}
for (int i1 = 0; i1 < points; i1++)
{
int i2 = (i1 + 1) % points;
int i3 = (i2 + 1) % points;
double x1 = data[2 * i1];
... | [
"public",
"static",
"boolean",
"isConvex",
"(",
"double",
"[",
"]",
"data",
",",
"int",
"points",
")",
"{",
"if",
"(",
"points",
"<",
"3",
")",
"{",
"return",
"true",
";",
"}",
"for",
"(",
"int",
"i1",
"=",
"0",
";",
"i1",
"<",
"points",
";",
"... | Returns true if polygon is convex.
@param data x1, y1, x2, y2, ...
@param points Number of points (xi, yi)
@return | [
"Returns",
"true",
"if",
"polygon",
"is",
"convex",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/math/Polygon.java#L156-L178 |
154,370 | tvesalainen/util | util/src/main/java/org/vesalainen/util/stream/FloatGenerator.java | FloatGenerator.provide | public boolean provide(float value)
{
FloatReference ref = new FloatReference(value);
boolean res = queue.offer(ref);
return res;
} | java | public boolean provide(float value)
{
FloatReference ref = new FloatReference(value);
boolean res = queue.offer(ref);
return res;
} | [
"public",
"boolean",
"provide",
"(",
"float",
"value",
")",
"{",
"FloatReference",
"ref",
"=",
"new",
"FloatReference",
"(",
"value",
")",
";",
"boolean",
"res",
"=",
"queue",
".",
"offer",
"(",
"ref",
")",
";",
"return",
"res",
";",
"}"
] | Provides new item to the generator
@param value | [
"Provides",
"new",
"item",
"to",
"the",
"generator"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/stream/FloatGenerator.java#L39-L44 |
154,371 | tvesalainen/util | util/src/main/java/org/vesalainen/util/stream/FloatGenerator.java | FloatGenerator.generate | public float generate()
{
try
{
FloatReference ref = queue.take();
float value = ref.getValue();
return value;
}
catch (InterruptedException ex)
{
throw new IllegalArgumentException(ex);
}
} | java | public float generate()
{
try
{
FloatReference ref = queue.take();
float value = ref.getValue();
return value;
}
catch (InterruptedException ex)
{
throw new IllegalArgumentException(ex);
}
} | [
"public",
"float",
"generate",
"(",
")",
"{",
"try",
"{",
"FloatReference",
"ref",
"=",
"queue",
".",
"take",
"(",
")",
";",
"float",
"value",
"=",
"ref",
".",
"getValue",
"(",
")",
";",
"return",
"value",
";",
"}",
"catch",
"(",
"InterruptedException"... | Returns item provided in different thread
@return | [
"Returns",
"item",
"provided",
"in",
"different",
"thread"
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/util/stream/FloatGenerator.java#L49-L61 |
154,372 | sdorra/ldap-unit | src/main/java/com/github/sdorra/ldap/LDAPRule.java | LDAPRule.getConnectionProperties | @SuppressWarnings("UseOfObsoleteCollectionType")
public Hashtable<String, String> getConnectionProperties()
{
StringBuilder url = new StringBuilder("ldap://");
url.append(host).append(":").append(String.valueOf(port)).append("/");
Hashtable<String, String> props = new Hashtable<String, String>(11);
... | java | @SuppressWarnings("UseOfObsoleteCollectionType")
public Hashtable<String, String> getConnectionProperties()
{
StringBuilder url = new StringBuilder("ldap://");
url.append(host).append(":").append(String.valueOf(port)).append("/");
Hashtable<String, String> props = new Hashtable<String, String>(11);
... | [
"@",
"SuppressWarnings",
"(",
"\"UseOfObsoleteCollectionType\"",
")",
"public",
"Hashtable",
"<",
"String",
",",
"String",
">",
"getConnectionProperties",
"(",
")",
"{",
"StringBuilder",
"url",
"=",
"new",
"StringBuilder",
"(",
"\"ldap://\"",
")",
";",
"url",
".",... | Returns jndi properties for the in memory directory server.
@return jndi properties | [
"Returns",
"jndi",
"properties",
"for",
"the",
"in",
"memory",
"directory",
"server",
"."
] | 864c1766d304345bcfe6f3428d52db2132532bb2 | https://github.com/sdorra/ldap-unit/blob/864c1766d304345bcfe6f3428d52db2132532bb2/src/main/java/com/github/sdorra/ldap/LDAPRule.java#L150-L167 |
154,373 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/EMailTrxMessageIn.java | EMailTrxMessageIn.isEndChar | public boolean isEndChar(char chChar)
{
if ((chChar == '\n')
|| (chChar == '\r')
|| (chChar == JAVA_NEW_LINE))
return true;
if (chChar == '<')
return true;
return false;
} | java | public boolean isEndChar(char chChar)
{
if ((chChar == '\n')
|| (chChar == '\r')
|| (chChar == JAVA_NEW_LINE))
return true;
if (chChar == '<')
return true;
return false;
} | [
"public",
"boolean",
"isEndChar",
"(",
"char",
"chChar",
")",
"{",
"if",
"(",
"(",
"chChar",
"==",
"'",
"'",
")",
"||",
"(",
"chChar",
"==",
"'",
"'",
")",
"||",
"(",
"chChar",
"==",
"JAVA_NEW_LINE",
")",
")",
"return",
"true",
";",
"if",
"(",
"c... | Is this the ending character of the property? | [
"Is",
"this",
"the",
"ending",
"character",
"of",
"the",
"property?"
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/EMailTrxMessageIn.java#L131-L140 |
154,374 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/EMailTrxMessageIn.java | EMailTrxMessageIn.getEMailParams | public Map<String,Object> getEMailParams(String strMessage)
{
Map<String,Object> properties = new Hashtable<String,Object>();
int iIndex = this.getStartNextPropertyKey(-1, strMessage);
while (iIndex != -1)
{
int iIndexEnd = strMessage.indexOf(END_OF_KEY_CHAR, iIndex);
... | java | public Map<String,Object> getEMailParams(String strMessage)
{
Map<String,Object> properties = new Hashtable<String,Object>();
int iIndex = this.getStartNextPropertyKey(-1, strMessage);
while (iIndex != -1)
{
int iIndexEnd = strMessage.indexOf(END_OF_KEY_CHAR, iIndex);
... | [
"public",
"Map",
"<",
"String",
",",
"Object",
">",
"getEMailParams",
"(",
"String",
"strMessage",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"properties",
"=",
"new",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"(",
")",
";",
"int",
"iInd... | Scan through this message and get the params to descriptions map.
@param externalMessage The received message to be converted to internal form.
@return The map of params to descriptions. | [
"Scan",
"through",
"this",
"message",
"and",
"get",
"the",
"params",
"to",
"descriptions",
"map",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/EMailTrxMessageIn.java#L146-L182 |
154,375 | jbundle/jbundle | base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/EMailTrxMessageIn.java | EMailTrxMessageIn.getStartNextPropertyKey | public int getStartNextPropertyKey(int iIndex, String strMessage)
{
for (iIndex = iIndex + 1; iIndex < strMessage.length(); iIndex++)
{
char chChar = strMessage.charAt(iIndex);
if (this.isEndChar(chChar))
break;
}
if (iIndex >= strMessage.lengt... | java | public int getStartNextPropertyKey(int iIndex, String strMessage)
{
for (iIndex = iIndex + 1; iIndex < strMessage.length(); iIndex++)
{
char chChar = strMessage.charAt(iIndex);
if (this.isEndChar(chChar))
break;
}
if (iIndex >= strMessage.lengt... | [
"public",
"int",
"getStartNextPropertyKey",
"(",
"int",
"iIndex",
",",
"String",
"strMessage",
")",
"{",
"for",
"(",
"iIndex",
"=",
"iIndex",
"+",
"1",
";",
"iIndex",
"<",
"strMessage",
".",
"length",
"(",
")",
";",
"iIndex",
"++",
")",
"{",
"char",
"c... | Get the next property key after this location.
@param iIndex start at this location +1.
@param strMessage The message to search through.
@return The position of this property key (or -1 if EOF). | [
"Get",
"the",
"next",
"property",
"key",
"after",
"this",
"location",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/message/trx/src/main/java/org/jbundle/base/message/trx/message/external/EMailTrxMessageIn.java#L212-L241 |
154,376 | pressgang-ccms/PressGangCCMSQuery | src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFieldFilter.java | BaseFieldFilter.resetAllValues | protected void resetAllValues() {
logic = new FilterFieldStringData(CommonFilterConstants.LOGIC_FILTER_VAR, CommonFilterConstants.LOGIC_FILTER_VAR_DESC);
filterVars.clear();
filterVars.add(logic);
} | java | protected void resetAllValues() {
logic = new FilterFieldStringData(CommonFilterConstants.LOGIC_FILTER_VAR, CommonFilterConstants.LOGIC_FILTER_VAR_DESC);
filterVars.clear();
filterVars.add(logic);
} | [
"protected",
"void",
"resetAllValues",
"(",
")",
"{",
"logic",
"=",
"new",
"FilterFieldStringData",
"(",
"CommonFilterConstants",
".",
"LOGIC_FILTER_VAR",
",",
"CommonFilterConstants",
".",
"LOGIC_FILTER_VAR_DESC",
")",
";",
"filterVars",
".",
"clear",
"(",
")",
";"... | Reset all of the Field Variables to their default values. | [
"Reset",
"all",
"of",
"the",
"Field",
"Variables",
"to",
"their",
"default",
"values",
"."
] | 2bb23430adab956737d0301cd2ea933f986dd85b | https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFieldFilter.java#L60-L65 |
154,377 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.appendByte | public static byte[] appendByte(byte[] bytes, byte b) {
byte[] result = Arrays.copyOf(bytes, bytes.length + 1);
result[result.length - 1] = b;
return result;
} | java | public static byte[] appendByte(byte[] bytes, byte b) {
byte[] result = Arrays.copyOf(bytes, bytes.length + 1);
result[result.length - 1] = b;
return result;
} | [
"public",
"static",
"byte",
"[",
"]",
"appendByte",
"(",
"byte",
"[",
"]",
"bytes",
",",
"byte",
"b",
")",
"{",
"byte",
"[",
"]",
"result",
"=",
"Arrays",
".",
"copyOf",
"(",
"bytes",
",",
"bytes",
".",
"length",
"+",
"1",
")",
";",
"result",
"["... | Creates a copy of bytes and appends b to the end of it
@param bytes
bytes data
@param b
append byte
@return appended byte[] | [
"Creates",
"a",
"copy",
"of",
"bytes",
"and",
"appends",
"b",
"to",
"the",
"end",
"of",
"it"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L46-L50 |
154,378 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.matchingNibbleLength | public static int matchingNibbleLength(byte[] a, byte[] b) {
int i = 0;
int length = a.length < b.length ? a.length : b.length;
while (i < length) {
if (a[i] != b[i])
return i;
i++;
}
return i;
} | java | public static int matchingNibbleLength(byte[] a, byte[] b) {
int i = 0;
int length = a.length < b.length ? a.length : b.length;
while (i < length) {
if (a[i] != b[i])
return i;
i++;
}
return i;
} | [
"public",
"static",
"int",
"matchingNibbleLength",
"(",
"byte",
"[",
"]",
"a",
",",
"byte",
"[",
"]",
"b",
")",
"{",
"int",
"i",
"=",
"0",
";",
"int",
"length",
"=",
"a",
".",
"length",
"<",
"b",
".",
"length",
"?",
"a",
".",
"length",
":",
"b"... | Returns the amount of nibbles that match each other from 0 ... amount will
never be larger than smallest input
@param a
first input
@param b
second input
@return Number of bytes that match | [
"Returns",
"the",
"amount",
"of",
"nibbles",
"that",
"match",
"each",
"other",
"from",
"0",
"...",
"amount",
"will",
"never",
"be",
"larger",
"than",
"smallest",
"input"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L135-L144 |
154,379 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.longToBytesNoLeadZeroes | public static byte[] longToBytesNoLeadZeroes(long val) {
// todo: improve performance by while strip numbers until (long >> 8 == 0)
if (val == 0)
return EMPTY_BYTE_ARRAY;
byte[] data = ByteBuffer.allocate(8).putLong(val).array();
return stripLeadingZeroes(data);
} | java | public static byte[] longToBytesNoLeadZeroes(long val) {
// todo: improve performance by while strip numbers until (long >> 8 == 0)
if (val == 0)
return EMPTY_BYTE_ARRAY;
byte[] data = ByteBuffer.allocate(8).putLong(val).array();
return stripLeadingZeroes(data);
} | [
"public",
"static",
"byte",
"[",
"]",
"longToBytesNoLeadZeroes",
"(",
"long",
"val",
")",
"{",
"// todo: improve performance by while strip numbers until (long >> 8 == 0)",
"if",
"(",
"val",
"==",
"0",
")",
"return",
"EMPTY_BYTE_ARRAY",
";",
"byte",
"[",
"]",
"data",
... | Converts a long value into a byte array.
@param val
- long value to convert
@return decimal value with leading byte that are zeroes striped | [
"Converts",
"a",
"long",
"value",
"into",
"a",
"byte",
"array",
"."
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L164-L173 |
154,380 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.nibblesToPrettyString | public static String nibblesToPrettyString(byte[] nibbles) {
StringBuilder builder = new StringBuilder();
for (byte nibble : nibbles) {
final String nibbleString = oneByteToHexString(nibble);
builder.append("\\x").append(nibbleString);
}
return builder.toString();... | java | public static String nibblesToPrettyString(byte[] nibbles) {
StringBuilder builder = new StringBuilder();
for (byte nibble : nibbles) {
final String nibbleString = oneByteToHexString(nibble);
builder.append("\\x").append(nibbleString);
}
return builder.toString();... | [
"public",
"static",
"String",
"nibblesToPrettyString",
"(",
"byte",
"[",
"]",
"nibbles",
")",
"{",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"for",
"(",
"byte",
"nibble",
":",
"nibbles",
")",
"{",
"final",
"String",
"nibbleStrin... | Turn nibbles to a pretty looking output string
Example. [ 1, 2, 3, 4, 5 ] becomes '\x11\x23\x45'
@param nibbles
- getting byte of data [ 04 ] and turning it to a '\x04'
representation
@return pretty string of nibbles | [
"Turn",
"nibbles",
"to",
"a",
"pretty",
"looking",
"output",
"string"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L287-L294 |
154,381 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.numBytes | public static int numBytes(String val) {
BigInteger bInt = new BigInteger(val);
int bytes = 0;
while (!bInt.equals(BigInteger.ZERO)) {
bInt = bInt.shiftRight(8);
++bytes;
}
if (bytes == 0)
++bytes;
return bytes;
} | java | public static int numBytes(String val) {
BigInteger bInt = new BigInteger(val);
int bytes = 0;
while (!bInt.equals(BigInteger.ZERO)) {
bInt = bInt.shiftRight(8);
++bytes;
}
if (bytes == 0)
++bytes;
return bytes;
} | [
"public",
"static",
"int",
"numBytes",
"(",
"String",
"val",
")",
"{",
"BigInteger",
"bInt",
"=",
"new",
"BigInteger",
"(",
"val",
")",
";",
"int",
"bytes",
"=",
"0",
";",
"while",
"(",
"!",
"bInt",
".",
"equals",
"(",
"BigInteger",
".",
"ZERO",
")",... | Calculate the number of bytes need to encode the number
@param val
- number
@return number of min bytes used to encode the number | [
"Calculate",
"the",
"number",
"of",
"bytes",
"need",
"to",
"encode",
"the",
"number"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L310-L322 |
154,382 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.encodeDataList | public static byte[] encodeDataList(Object... args) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
for (Object arg : args) {
byte[] val = encodeValFor32Bits(arg);
try {
baos.write(val);
} catch (IOException e) {
throw new E... | java | public static byte[] encodeDataList(Object... args) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
for (Object arg : args) {
byte[] val = encodeValFor32Bits(arg);
try {
baos.write(val);
} catch (IOException e) {
throw new E... | [
"public",
"static",
"byte",
"[",
"]",
"encodeDataList",
"(",
"Object",
"...",
"args",
")",
"{",
"ByteArrayOutputStream",
"baos",
"=",
"new",
"ByteArrayOutputStream",
"(",
")",
";",
"for",
"(",
"Object",
"arg",
":",
"args",
")",
"{",
"byte",
"[",
"]",
"va... | encode the values and concatenate together
@param args
Object
@return byte[] | [
"encode",
"the",
"values",
"and",
"concatenate",
"together"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L362-L373 |
154,383 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.increment | public static boolean increment(byte[] bytes) {
final int startIndex = 0;
int i;
for (i = bytes.length - 1; i >= startIndex; i--) {
bytes[i]++;
if (bytes[i] != 0)
break;
}
// we return false when all bytes are 0 again
return (i >= s... | java | public static boolean increment(byte[] bytes) {
final int startIndex = 0;
int i;
for (i = bytes.length - 1; i >= startIndex; i--) {
bytes[i]++;
if (bytes[i] != 0)
break;
}
// we return false when all bytes are 0 again
return (i >= s... | [
"public",
"static",
"boolean",
"increment",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"final",
"int",
"startIndex",
"=",
"0",
";",
"int",
"i",
";",
"for",
"(",
"i",
"=",
"bytes",
".",
"length",
"-",
"1",
";",
"i",
">=",
"startIndex",
";",
"i",
"-... | increment byte array as a number until max is reached
@param bytes
byte[]
@return boolean | [
"increment",
"byte",
"array",
"as",
"a",
"number",
"until",
"max",
"is",
"reached"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L412-L422 |
154,384 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.copyToArray | public static byte[] copyToArray(BigInteger value) {
byte[] src = ByteUtil.bigIntegerToBytes(value);
byte[] dest = ByteBuffer.allocate(32).array();
System.arraycopy(src, 0, dest, dest.length - src.length, src.length);
return dest;
} | java | public static byte[] copyToArray(BigInteger value) {
byte[] src = ByteUtil.bigIntegerToBytes(value);
byte[] dest = ByteBuffer.allocate(32).array();
System.arraycopy(src, 0, dest, dest.length - src.length, src.length);
return dest;
} | [
"public",
"static",
"byte",
"[",
"]",
"copyToArray",
"(",
"BigInteger",
"value",
")",
"{",
"byte",
"[",
"]",
"src",
"=",
"ByteUtil",
".",
"bigIntegerToBytes",
"(",
"value",
")",
";",
"byte",
"[",
"]",
"dest",
"=",
"ByteBuffer",
".",
"allocate",
"(",
"3... | Utility function to copy a byte array into a new byte array with given size.
If the src length is smaller than the given size, the result will be
left-padded with zeros.
@param value
- a BigInteger with a maximum value of 2^256-1
@return Byte array of given size with a copy of the <code>src</code> | [
"Utility",
"function",
"to",
"copy",
"a",
"byte",
"array",
"into",
"a",
"new",
"byte",
"array",
"with",
"given",
"size",
".",
"If",
"the",
"src",
"length",
"is",
"smaller",
"than",
"the",
"given",
"size",
"the",
"result",
"will",
"be",
"left",
"-",
"pa... | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L433-L438 |
154,385 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.xorAlignRight | public static byte[] xorAlignRight(byte[] b1, byte[] b2) {
if (b1.length > b2.length) {
byte[] b2_ = new byte[b1.length];
System.arraycopy(b2, 0, b2_, b1.length - b2.length, b2.length);
b2 = b2_;
} else if (b2.length > b1.length) {
byte[] b1_ = new byte[b2... | java | public static byte[] xorAlignRight(byte[] b1, byte[] b2) {
if (b1.length > b2.length) {
byte[] b2_ = new byte[b1.length];
System.arraycopy(b2, 0, b2_, b1.length - b2.length, b2.length);
b2 = b2_;
} else if (b2.length > b1.length) {
byte[] b1_ = new byte[b2... | [
"public",
"static",
"byte",
"[",
"]",
"xorAlignRight",
"(",
"byte",
"[",
"]",
"b1",
",",
"byte",
"[",
"]",
"b2",
")",
"{",
"if",
"(",
"b1",
".",
"length",
">",
"b2",
".",
"length",
")",
"{",
"byte",
"[",
"]",
"b2_",
"=",
"new",
"byte",
"[",
"... | XORs byte arrays of different lengths by aligning length of the shortest via
adding zeros at beginning
@param b1
b1
@param b2
b2
@return xorAlignRight | [
"XORs",
"byte",
"arrays",
"of",
"different",
"lengths",
"by",
"aligning",
"length",
"of",
"the",
"shortest",
"via",
"adding",
"zeros",
"at",
"beginning"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L510-L522 |
154,386 | arxanchain/java-common | src/main/java/com/arxanfintech/common/util/ByteUtil.java | ByteUtil.hexStringToBytes | public static byte[] hexStringToBytes(String data) {
if (data == null)
return EMPTY_BYTE_ARRAY;
if (data.startsWith("0x"))
data = data.substring(2);
return Hex.decode(data);
} | java | public static byte[] hexStringToBytes(String data) {
if (data == null)
return EMPTY_BYTE_ARRAY;
if (data.startsWith("0x"))
data = data.substring(2);
return Hex.decode(data);
} | [
"public",
"static",
"byte",
"[",
"]",
"hexStringToBytes",
"(",
"String",
"data",
")",
"{",
"if",
"(",
"data",
"==",
"null",
")",
"return",
"EMPTY_BYTE_ARRAY",
";",
"if",
"(",
"data",
".",
"startsWith",
"(",
"\"0x\"",
")",
")",
"data",
"=",
"data",
".",... | Converts string hex representation to data bytes
@param data
String like '0xa5e..' or just 'a5e..'
@return decoded bytes array | [
"Converts",
"string",
"hex",
"representation",
"to",
"data",
"bytes"
] | 3ddfedfd948f5bab3fee0b74b85cdce4702ed84e | https://github.com/arxanchain/java-common/blob/3ddfedfd948f5bab3fee0b74b85cdce4702ed84e/src/main/java/com/arxanfintech/common/util/ByteUtil.java#L661-L667 |
154,387 | openengsb-labs/labs-endtoend | core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java | MavenConfigurationHelper.getConfig | public static MavenConfiguration getConfig(final File settingsFile, final Properties props) throws Exception {
props.setProperty(ServiceConstants.PID + MavenConstants.PROPERTY_SETTINGS_FILE, settingsFile.toURI()
.toASCIIString());
final MavenConfigurationImpl config = new MavenConfigur... | java | public static MavenConfiguration getConfig(final File settingsFile, final Properties props) throws Exception {
props.setProperty(ServiceConstants.PID + MavenConstants.PROPERTY_SETTINGS_FILE, settingsFile.toURI()
.toASCIIString());
final MavenConfigurationImpl config = new MavenConfigur... | [
"public",
"static",
"MavenConfiguration",
"getConfig",
"(",
"final",
"File",
"settingsFile",
",",
"final",
"Properties",
"props",
")",
"throws",
"Exception",
"{",
"props",
".",
"setProperty",
"(",
"ServiceConstants",
".",
"PID",
"+",
"MavenConstants",
".",
"PROPER... | Load settings.xml file and apply custom properties. | [
"Load",
"settings",
".",
"xml",
"file",
"and",
"apply",
"custom",
"properties",
"."
] | 5604227b47cd9f45f1757256ca0fd0ddf5ac5871 | https://github.com/openengsb-labs/labs-endtoend/blob/5604227b47cd9f45f1757256ca0fd0ddf5ac5871/core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java#L20-L34 |
154,388 | openengsb-labs/labs-endtoend | core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java | MavenConfigurationHelper.getMavenHome | public static File getMavenHome() throws Exception {
final String command;
switch (OS.current()) {
case LINUX:
case MAC:
command = "mvn";
break;
case WINDOWS:
command = "mvn.bat";
break;
default:
throw new Illega... | java | public static File getMavenHome() throws Exception {
final String command;
switch (OS.current()) {
case LINUX:
case MAC:
command = "mvn";
break;
case WINDOWS:
command = "mvn.bat";
break;
default:
throw new Illega... | [
"public",
"static",
"File",
"getMavenHome",
"(",
")",
"throws",
"Exception",
"{",
"final",
"String",
"command",
";",
"switch",
"(",
"OS",
".",
"current",
"(",
")",
")",
"{",
"case",
"LINUX",
":",
"case",
"MAC",
":",
"command",
"=",
"\"mvn\"",
";",
"bre... | Discover maven home from executable on PATH, using conventions. | [
"Discover",
"maven",
"home",
"from",
"executable",
"on",
"PATH",
"using",
"conventions",
"."
] | 5604227b47cd9f45f1757256ca0fd0ddf5ac5871 | https://github.com/openengsb-labs/labs-endtoend/blob/5604227b47cd9f45f1757256ca0fd0ddf5ac5871/core/src/main/java/org/openengsb/labs/endtoend/util/MavenConfigurationHelper.java#L39-L65 |
154,389 | tvesalainen/util | util/src/main/java/org/vesalainen/time/MutableClock.java | MutableClock.getZonedDateTime | public ZonedDateTime getZonedDateTime()
{
return ZonedDateTime.of(
get(ChronoField.YEAR),
get(ChronoField.MONTH_OF_YEAR),
get(ChronoField.DAY_OF_MONTH),
get(ChronoField.HOUR_OF_DAY),
get(ChronoField.MINUTE_OF_HOUR),
get(Chro... | java | public ZonedDateTime getZonedDateTime()
{
return ZonedDateTime.of(
get(ChronoField.YEAR),
get(ChronoField.MONTH_OF_YEAR),
get(ChronoField.DAY_OF_MONTH),
get(ChronoField.HOUR_OF_DAY),
get(ChronoField.MINUTE_OF_HOUR),
get(Chro... | [
"public",
"ZonedDateTime",
"getZonedDateTime",
"(",
")",
"{",
"return",
"ZonedDateTime",
".",
"of",
"(",
"get",
"(",
"ChronoField",
".",
"YEAR",
")",
",",
"get",
"(",
"ChronoField",
".",
"MONTH_OF_YEAR",
")",
",",
"get",
"(",
"ChronoField",
".",
"DAY_OF_MONT... | Returns ZonedDateTime created from latest update.
@return | [
"Returns",
"ZonedDateTime",
"created",
"from",
"latest",
"update",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/MutableClock.java#L127-L138 |
154,390 | tvesalainen/util | util/src/main/java/org/vesalainen/time/MutableClock.java | MutableClock.setMillis | public void setMillis(long millis)
{
ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneOffset.UTC);
set(zonedDateTime);
} | java | public void setMillis(long millis)
{
ZonedDateTime zonedDateTime = ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneOffset.UTC);
set(zonedDateTime);
} | [
"public",
"void",
"setMillis",
"(",
"long",
"millis",
")",
"{",
"ZonedDateTime",
"zonedDateTime",
"=",
"ZonedDateTime",
".",
"ofInstant",
"(",
"Instant",
".",
"ofEpochMilli",
"(",
"millis",
")",
",",
"ZoneOffset",
".",
"UTC",
")",
";",
"set",
"(",
"zonedDate... | Sets time by using milli seconds from epoch.
@param millis | [
"Sets",
"time",
"by",
"using",
"milli",
"seconds",
"from",
"epoch",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/time/MutableClock.java#L143-L147 |
154,391 | jbundle/jbundle | app/program/db/src/main/java/org/jbundle/app/program/db/ClassProject.java | ClassProject.getFileName | public String getFileName(String strFileName, String strPackage, CodeType codeType, boolean fullPath, boolean sourcePath)
{
ProgramControl recProgramControl = (ProgramControl)this.getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE);
if (recProgramControl == null)
recProgramCo... | java | public String getFileName(String strFileName, String strPackage, CodeType codeType, boolean fullPath, boolean sourcePath)
{
ProgramControl recProgramControl = (ProgramControl)this.getRecordOwner().getRecord(ProgramControl.PROGRAM_CONTROL_FILE);
if (recProgramControl == null)
recProgramCo... | [
"public",
"String",
"getFileName",
"(",
"String",
"strFileName",
",",
"String",
"strPackage",
",",
"CodeType",
"codeType",
",",
"boolean",
"fullPath",
",",
"boolean",
"sourcePath",
")",
"{",
"ProgramControl",
"recProgramControl",
"=",
"(",
"ProgramControl",
")",
"... | Get the path to this file name.
@param strFileName The filename to find (If blank, just get the path to the root package; If null, path to project source).
@param strPackage The relative package to this file name (If null, no package, if blank, default package path)
@param codeType The code type
@param fullPath If true... | [
"Get",
"the",
"path",
"to",
"this",
"file",
"name",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/db/src/main/java/org/jbundle/app/program/db/ClassProject.java#L257-L313 |
154,392 | microfocus-idol/java-view-proxy-components | hod/src/main/java/com/hp/autonomy/frontend/view/hod/HodViewServiceImpl.java | HodViewServiceImpl.formatRawContent | private InputStream formatRawContent(final Document document) throws IOException {
final String body = "<h1>" + escapeAndAddLineBreaks(resolveTitle(document)) + "</h1>"
+ "<p>" + escapeAndAddLineBreaks(document.getContent()) + "</p>";
return IOUtils.toInputStream(body, StandardCharsets.... | java | private InputStream formatRawContent(final Document document) throws IOException {
final String body = "<h1>" + escapeAndAddLineBreaks(resolveTitle(document)) + "</h1>"
+ "<p>" + escapeAndAddLineBreaks(document.getContent()) + "</p>";
return IOUtils.toInputStream(body, StandardCharsets.... | [
"private",
"InputStream",
"formatRawContent",
"(",
"final",
"Document",
"document",
")",
"throws",
"IOException",
"{",
"final",
"String",
"body",
"=",
"\"<h1>\"",
"+",
"escapeAndAddLineBreaks",
"(",
"resolveTitle",
"(",
"document",
")",
")",
"+",
"\"</h1>\"",
"+",... | Format the document's content for display in a browser | [
"Format",
"the",
"document",
"s",
"content",
"for",
"display",
"in",
"a",
"browser"
] | d338c38fb9fb78adcc1887c4b23617372c06c651 | https://github.com/microfocus-idol/java-view-proxy-components/blob/d338c38fb9fb78adcc1887c4b23617372c06c651/hod/src/main/java/com/hp/autonomy/frontend/view/hod/HodViewServiceImpl.java#L92-L97 |
154,393 | amlinv/amq-topo-utils | src/main/java/com/amlinv/activemq/topo/discovery/MBeanDestinationDiscoverer.java | MBeanDestinationDiscoverer.pollOnce | public void pollOnce () throws IOException {
MBeanAccessConnection connection = this.mBeanAccessConnectionFactory.createConnection();
//
// Set of Queues known at start in order to detect Queues lost. This set may contain queues already known to
// have been lost.
//
S... | java | public void pollOnce () throws IOException {
MBeanAccessConnection connection = this.mBeanAccessConnectionFactory.createConnection();
//
// Set of Queues known at start in order to detect Queues lost. This set may contain queues already known to
// have been lost.
//
S... | [
"public",
"void",
"pollOnce",
"(",
")",
"throws",
"IOException",
"{",
"MBeanAccessConnection",
"connection",
"=",
"this",
".",
"mBeanAccessConnectionFactory",
".",
"createConnection",
"(",
")",
";",
"//",
"// Set of Queues known at start in order to detect Queues lost. This ... | Poll for destinations and update the registry with new destinations found, and clean out destinations not found
and not existing on any broker.
@throws IOException | [
"Poll",
"for",
"destinations",
"and",
"update",
"the",
"registry",
"with",
"new",
"destinations",
"found",
"and",
"clean",
"out",
"destinations",
"not",
"found",
"and",
"not",
"existing",
"on",
"any",
"broker",
"."
] | 4d82d5735d59f9c95e149362a09ea4d27d9ac4ac | https://github.com/amlinv/amq-topo-utils/blob/4d82d5735d59f9c95e149362a09ea4d27d9ac4ac/src/main/java/com/amlinv/activemq/topo/discovery/MBeanDestinationDiscoverer.java#L116-L161 |
154,394 | amlinv/amq-topo-utils | src/main/java/com/amlinv/activemq/topo/discovery/MBeanDestinationDiscoverer.java | MBeanDestinationDiscoverer.onFoundDestination | protected void onFoundDestination (String destName) {
if ( ( destName != null ) && ( ! destName.isEmpty() ) ) {
DestinationState destState =
this.registry.putIfAbsent(destName, new DestinationState(destName, this.brokerId));
//
// If it was already there,... | java | protected void onFoundDestination (String destName) {
if ( ( destName != null ) && ( ! destName.isEmpty() ) ) {
DestinationState destState =
this.registry.putIfAbsent(destName, new DestinationState(destName, this.brokerId));
//
// If it was already there,... | [
"protected",
"void",
"onFoundDestination",
"(",
"String",
"destName",
")",
"{",
"if",
"(",
"(",
"destName",
"!=",
"null",
")",
"&&",
"(",
"!",
"destName",
".",
"isEmpty",
"(",
")",
")",
")",
"{",
"DestinationState",
"destState",
"=",
"this",
".",
"regist... | For the destination represented by the named mbean, add the destination to the registry.
@param destName name of the destination. | [
"For",
"the",
"destination",
"represented",
"by",
"the",
"named",
"mbean",
"add",
"the",
"destination",
"to",
"the",
"registry",
"."
] | 4d82d5735d59f9c95e149362a09ea4d27d9ac4ac | https://github.com/amlinv/amq-topo-utils/blob/4d82d5735d59f9c95e149362a09ea4d27d9ac4ac/src/main/java/com/amlinv/activemq/topo/discovery/MBeanDestinationDiscoverer.java#L168-L180 |
154,395 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java | TableSession.set | public void set(Object data, int iOpenMode) throws DBException, RemoteException
{
Record record = this.getMainRecord();
int iOldOpenMode = record.getOpenMode();
try {
Utility.getLogger().info("EJB Set");
synchronized (this.getTask())
{
re... | java | public void set(Object data, int iOpenMode) throws DBException, RemoteException
{
Record record = this.getMainRecord();
int iOldOpenMode = record.getOpenMode();
try {
Utility.getLogger().info("EJB Set");
synchronized (this.getTask())
{
re... | [
"public",
"void",
"set",
"(",
"Object",
"data",
",",
"int",
"iOpenMode",
")",
"throws",
"DBException",
",",
"RemoteException",
"{",
"Record",
"record",
"=",
"this",
".",
"getMainRecord",
"(",
")",
";",
"int",
"iOldOpenMode",
"=",
"record",
".",
"getOpenMode"... | Update the current record.
This method has some wierd code to emulate the way behaviors are called on a write.
@param The data to update.
@exception DBException File exception. | [
"Update",
"the",
"current",
"record",
".",
"This",
"method",
"has",
"some",
"wierd",
"code",
"to",
"emulate",
"the",
"way",
"behaviors",
"are",
"called",
"on",
"a",
"write",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L354-L383 |
154,396 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java | TableSession.getAtRow | private Object getAtRow(int iRowIndex) throws DBException
{
try {
Utility.getLogger().info("get row " + iRowIndex);
GridTable gridTable = this.getGridTable(this.getMainRecord());
gridTable.getCurrentTable().getRecord().setEditMode(Constants.EDIT_NONE);
Rec... | java | private Object getAtRow(int iRowIndex) throws DBException
{
try {
Utility.getLogger().info("get row " + iRowIndex);
GridTable gridTable = this.getGridTable(this.getMainRecord());
gridTable.getCurrentTable().getRecord().setEditMode(Constants.EDIT_NONE);
Rec... | [
"private",
"Object",
"getAtRow",
"(",
"int",
"iRowIndex",
")",
"throws",
"DBException",
"{",
"try",
"{",
"Utility",
".",
"getLogger",
"(",
")",
".",
"info",
"(",
"\"get row \"",
"+",
"iRowIndex",
")",
";",
"GridTable",
"gridTable",
"=",
"this",
".",
"getGr... | Retreive this relative record in the table.
This method is used exclusively by the get method to read a single row of a grid table.
@param iRowIndex The row to retrieve.
@return The record or an error code as an Integer.
@exception DBException File exception.
@exception RemoteException RMI exception. | [
"Retreive",
"this",
"relative",
"record",
"in",
"the",
"table",
".",
"This",
"method",
"is",
"used",
"exclusively",
"by",
"the",
"get",
"method",
"to",
"read",
"a",
"single",
"row",
"of",
"a",
"grid",
"table",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L740-L780 |
154,397 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java | TableSession.makeFieldList | public org.jbundle.thin.base.db.FieldList makeFieldList(String strFieldsToInclude) throws RemoteException
{
synchronized (this.getTask())
{
FieldList fieldList = new FieldList(null);
Record record = this.getMainRecord();
boolean bAllSelected = record.isAllSelected... | java | public org.jbundle.thin.base.db.FieldList makeFieldList(String strFieldsToInclude) throws RemoteException
{
synchronized (this.getTask())
{
FieldList fieldList = new FieldList(null);
Record record = this.getMainRecord();
boolean bAllSelected = record.isAllSelected... | [
"public",
"org",
".",
"jbundle",
".",
"thin",
".",
"base",
".",
"db",
".",
"FieldList",
"makeFieldList",
"(",
"String",
"strFieldsToInclude",
")",
"throws",
"RemoteException",
"{",
"synchronized",
"(",
"this",
".",
"getTask",
"(",
")",
")",
"{",
"FieldList",... | Make a thin FieldList for this table.
@param strFieldsToInclude The fields to include in this field list (Pass the string [PHYSICAL] or SELECTED).
@return The thin FieldList for this record.
Usually used for special queries that don't have a field list available. | [
"Make",
"a",
"thin",
"FieldList",
"for",
"this",
"table",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L798-L835 |
154,398 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java | TableSession.cleanBuffer | public void cleanBuffer(BaseBuffer buffer, Record record)
{
Vector<Object> vector = (Vector)buffer.getPhysicalData();
int iCurrentIndex = 0;
buffer.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
for (int... | java | public void cleanBuffer(BaseBuffer buffer, Record record)
{
Vector<Object> vector = (Vector)buffer.getPhysicalData();
int iCurrentIndex = 0;
buffer.resetPosition(); // Start at the first field
int iFieldCount = record.getFieldCount(); // Number of fields to read in
for (int... | [
"public",
"void",
"cleanBuffer",
"(",
"BaseBuffer",
"buffer",
",",
"Record",
"record",
")",
"{",
"Vector",
"<",
"Object",
">",
"vector",
"=",
"(",
"Vector",
")",
"buffer",
".",
"getPhysicalData",
"(",
")",
";",
"int",
"iCurrentIndex",
"=",
"0",
";",
"buf... | Clean the buffer of fields that will change a field that has been modified by the client.
@param buffer The Vector buffer to clean.
@param record The target Record. | [
"Clean",
"the",
"buffer",
"of",
"fields",
"that",
"will",
"change",
"a",
"field",
"that",
"has",
"been",
"modified",
"by",
"the",
"client",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L926-L945 |
154,399 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java | TableSession.getMasterSlave | public int getMasterSlave()
{
int iMasterSlave = super.getMasterSlave();
if (iMasterSlave == RecordOwner.MASTER)
if (this.getClass() == org.jbundle.base.remote.db.TableSession.class)
return RecordOwner.SLAVE; // Auto-created session is the Slave session (Unless it was overridden)
... | java | public int getMasterSlave()
{
int iMasterSlave = super.getMasterSlave();
if (iMasterSlave == RecordOwner.MASTER)
if (this.getClass() == org.jbundle.base.remote.db.TableSession.class)
return RecordOwner.SLAVE; // Auto-created session is the Slave session (Unless it was overridden)
... | [
"public",
"int",
"getMasterSlave",
"(",
")",
"{",
"int",
"iMasterSlave",
"=",
"super",
".",
"getMasterSlave",
"(",
")",
";",
"if",
"(",
"iMasterSlave",
"==",
"RecordOwner",
".",
"MASTER",
")",
"if",
"(",
"this",
".",
"getClass",
"(",
")",
"==",
"org",
... | Is this recordowner the master or slave.
The slave is typically the TableSessionObject that is created to manage a ClientTable.
@return The MASTER/SLAVE flag. | [
"Is",
"this",
"recordowner",
"the",
"master",
"or",
"slave",
".",
"The",
"slave",
"is",
"typically",
"the",
"TableSessionObject",
"that",
"is",
"created",
"to",
"manage",
"a",
"ClientTable",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/db/TableSession.java#L1054-L1061 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.