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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
151,400 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/BaseListener.java | BaseListener.getNextEnabledListener | public BaseListener getNextEnabledListener()
{
if (m_nextListener == null)
return null;
if (m_nextListener.isEnabled())
return m_nextListener;
else
return m_nextListener.getNextEnabledListener();
} | java | public BaseListener getNextEnabledListener()
{
if (m_nextListener == null)
return null;
if (m_nextListener.isEnabled())
return m_nextListener;
else
return m_nextListener.getNextEnabledListener();
} | [
"public",
"BaseListener",
"getNextEnabledListener",
"(",
")",
"{",
"if",
"(",
"m_nextListener",
"==",
"null",
")",
"return",
"null",
";",
"if",
"(",
"m_nextListener",
".",
"isEnabled",
"(",
")",
")",
"return",
"m_nextListener",
";",
"else",
"return",
"m_nextLi... | Get then next enabled listener in the chain.
@return The next enabled listener (of null if none). | [
"Get",
"then",
"next",
"enabled",
"listener",
"in",
"the",
"chain",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/BaseListener.java#L242-L250 |
151,401 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/GetWSDL.java | GetWSDL.getFullPath | public String getFullPath(String strSite, String strPath)
{
if (strSite != null)
{
if (strPath != null)
if (strPath.startsWith("/"))
strPath = strSite + strPath;
}
return strPath;
} | java | public String getFullPath(String strSite, String strPath)
{
if (strSite != null)
{
if (strPath != null)
if (strPath.startsWith("/"))
strPath = strSite + strPath;
}
return strPath;
} | [
"public",
"String",
"getFullPath",
"(",
"String",
"strSite",
",",
"String",
"strPath",
")",
"{",
"if",
"(",
"strSite",
"!=",
"null",
")",
"{",
"if",
"(",
"strPath",
"!=",
"null",
")",
"if",
"(",
"strPath",
".",
"startsWith",
"(",
"\"/\"",
")",
")",
"... | GetFullPath Method. | [
"GetFullPath",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/GetWSDL.java#L164-L173 |
151,402 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/shared/SharedBaseRecordTable.java | SharedBaseRecordTable.moveToCurrentRecord | public Record moveToCurrentRecord(Record recBase)
{
if (recBase == null)
recBase = this.getBaseRecord(); // Actually, should always be the recBase.
BaseField fldRecordType = recBase.getSharedRecordTypeKey();
Object objKey = fldRecordType.getData();
BaseTable tableCurrent ... | java | public Record moveToCurrentRecord(Record recBase)
{
if (recBase == null)
recBase = this.getBaseRecord(); // Actually, should always be the recBase.
BaseField fldRecordType = recBase.getSharedRecordTypeKey();
Object objKey = fldRecordType.getData();
BaseTable tableCurrent ... | [
"public",
"Record",
"moveToCurrentRecord",
"(",
"Record",
"recBase",
")",
"{",
"if",
"(",
"recBase",
"==",
"null",
")",
"recBase",
"=",
"this",
".",
"getBaseRecord",
"(",
")",
";",
"// Actually, should always be the recBase.",
"BaseField",
"fldRecordType",
"=",
"r... | Figure what kind of record this record is and move it to the correct record.
@record The record to move to current. | [
"Figure",
"what",
"kind",
"of",
"record",
"this",
"record",
"is",
"and",
"move",
"it",
"to",
"the",
"correct",
"record",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/shared/SharedBaseRecordTable.java#L393-L426 |
151,403 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/shared/SharedBaseRecordTable.java | SharedBaseRecordTable.copyRecordInfo | public void copyRecordInfo(Record recDest, Record recSource, boolean bCopyEditMode, boolean bOnlyModifiedFields)
{
if (recDest == null)
recDest = this.getCurrentRecord();
if (recDest != recSource)
{
boolean bAllowFieldChange = false; // This will disable field behavi... | java | public void copyRecordInfo(Record recDest, Record recSource, boolean bCopyEditMode, boolean bOnlyModifiedFields)
{
if (recDest == null)
recDest = this.getCurrentRecord();
if (recDest != recSource)
{
boolean bAllowFieldChange = false; // This will disable field behavi... | [
"public",
"void",
"copyRecordInfo",
"(",
"Record",
"recDest",
",",
"Record",
"recSource",
",",
"boolean",
"bCopyEditMode",
",",
"boolean",
"bOnlyModifiedFields",
")",
"{",
"if",
"(",
"recDest",
"==",
"null",
")",
"recDest",
"=",
"this",
".",
"getCurrentRecord",
... | Set the current table target.
@param table The new current table. | [
"Set",
"the",
"current",
"table",
"target",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/shared/SharedBaseRecordTable.java#L431-L445 |
151,404 | nwillc/almost-functional | src/main/java/almost/functional/Optional.java | Optional.of | public static <T> Optional<T> of(final T optionalValue) { //NOPMD
checkNotNull(optionalValue, "Optional value may not be null in method of");
return new Optional<T>(optionalValue);
} | java | public static <T> Optional<T> of(final T optionalValue) { //NOPMD
checkNotNull(optionalValue, "Optional value may not be null in method of");
return new Optional<T>(optionalValue);
} | [
"public",
"static",
"<",
"T",
">",
"Optional",
"<",
"T",
">",
"of",
"(",
"final",
"T",
"optionalValue",
")",
"{",
"//NOPMD",
"checkNotNull",
"(",
"optionalValue",
",",
"\"Optional value may not be null in method of\"",
")",
";",
"return",
"new",
"Optional",
"<",... | Returns an Optional with the specified present non-null value.
@param <T> the class of the value
@param optionalValue the value to be present, which must be non-null
@return an Optional with the value present | [
"Returns",
"an",
"Optional",
"with",
"the",
"specified",
"present",
"non",
"-",
"null",
"value",
"."
] | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/Optional.java#L68-L71 |
151,405 | nwillc/almost-functional | src/main/java/almost/functional/Optional.java | Optional.filter | public Optional<T> filter(final Predicate<? super T> predicate) {
if (isPresent() && predicate.test(get())) {
return this;
}
return empty();
} | java | public Optional<T> filter(final Predicate<? super T> predicate) {
if (isPresent() && predicate.test(get())) {
return this;
}
return empty();
} | [
"public",
"Optional",
"<",
"T",
">",
"filter",
"(",
"final",
"Predicate",
"<",
"?",
"super",
"T",
">",
"predicate",
")",
"{",
"if",
"(",
"isPresent",
"(",
")",
"&&",
"predicate",
".",
"test",
"(",
"get",
"(",
")",
")",
")",
"{",
"return",
"this",
... | Apply a predicate to the optional, if the optional is present, and the predicate is true, return the optional, otherwise
return empty.
@param predicate the predicate to apply
@return the optional if the predicate is true, empty if not
@since 1.7 | [
"Apply",
"a",
"predicate",
"to",
"the",
"optional",
"if",
"the",
"optional",
"is",
"present",
"and",
"the",
"predicate",
"is",
"true",
"return",
"the",
"optional",
"otherwise",
"return",
"empty",
"."
] | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/Optional.java#L96-L102 |
151,406 | nwillc/almost-functional | src/main/java/almost/functional/Optional.java | Optional.ifPresent | public Optional<T> ifPresent(final Consumer<? super T> consumer) {
if (isPresent()) {
consumer.accept(get());
}
return this;
} | java | public Optional<T> ifPresent(final Consumer<? super T> consumer) {
if (isPresent()) {
consumer.accept(get());
}
return this;
} | [
"public",
"Optional",
"<",
"T",
">",
"ifPresent",
"(",
"final",
"Consumer",
"<",
"?",
"super",
"T",
">",
"consumer",
")",
"{",
"if",
"(",
"isPresent",
"(",
")",
")",
"{",
"consumer",
".",
"accept",
"(",
"get",
"(",
")",
")",
";",
"}",
"return",
"... | If a value is present, invoke the specified consumer with the value, otherwise do nothing.
@param consumer consumer to be invoked if present.
@return this Optional
@since 1.7.8 | [
"If",
"a",
"value",
"is",
"present",
"invoke",
"the",
"specified",
"consumer",
"with",
"the",
"value",
"otherwise",
"do",
"nothing",
"."
] | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/Optional.java#L133-L139 |
151,407 | nwillc/almost-functional | src/main/java/almost/functional/Optional.java | Optional.orElseSupplier | public T orElseSupplier(final Supplier<T> other) {
checkNotNull(other, "orElse requires a non null supplier");
if (isPresent()) {
return get();
}
return other.get();
} | java | public T orElseSupplier(final Supplier<T> other) {
checkNotNull(other, "orElse requires a non null supplier");
if (isPresent()) {
return get();
}
return other.get();
} | [
"public",
"T",
"orElseSupplier",
"(",
"final",
"Supplier",
"<",
"T",
">",
"other",
")",
"{",
"checkNotNull",
"(",
"other",
",",
"\"orElse requires a non null supplier\"",
")",
";",
"if",
"(",
"isPresent",
"(",
")",
")",
"{",
"return",
"get",
"(",
")",
";",... | Return the value if present, otherwise get the value from the Supplier.
@param other a Supplier
@return the value, if present, or the return of the Supplier
@since 1.7 | [
"Return",
"the",
"value",
"if",
"present",
"otherwise",
"get",
"the",
"value",
"from",
"the",
"Supplier",
"."
] | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/Optional.java#L176-L182 |
151,408 | nwillc/almost-functional | src/main/java/almost/functional/Optional.java | Optional.orElseThrow | public T orElseThrow(final String msg) {
checkNonEmptyString(msg, "Valid message required");
if (isPresent()) {
return get();
}
throw new NoSuchElementException(msg);
} | java | public T orElseThrow(final String msg) {
checkNonEmptyString(msg, "Valid message required");
if (isPresent()) {
return get();
}
throw new NoSuchElementException(msg);
} | [
"public",
"T",
"orElseThrow",
"(",
"final",
"String",
"msg",
")",
"{",
"checkNonEmptyString",
"(",
"msg",
",",
"\"Valid message required\"",
")",
";",
"if",
"(",
"isPresent",
"(",
")",
")",
"{",
"return",
"get",
"(",
")",
";",
"}",
"throw",
"new",
"NoSuc... | If optional is not empty return it's value, if empty throw a NoSuchElementException with message.
@param msg message for exception
@return optional value if present
@throws java.util.NoSuchElementException thrown if optional is empty
@since 1.7.3 | [
"If",
"optional",
"is",
"not",
"empty",
"return",
"it",
"s",
"value",
"if",
"empty",
"throw",
"a",
"NoSuchElementException",
"with",
"message",
"."
] | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/Optional.java#L192-L199 |
151,409 | nwillc/almost-functional | src/main/java/almost/functional/Optional.java | Optional.map | public <V> Optional<V> map(final Function<T, V> function) {
checkNotNull(function, "Must provide non null function to map");
if (isPresent()) {
final V applied = function.apply(get());
return applied == null ? Optional.<V>empty() : Optional.of(function.apply(get()));
} el... | java | public <V> Optional<V> map(final Function<T, V> function) {
checkNotNull(function, "Must provide non null function to map");
if (isPresent()) {
final V applied = function.apply(get());
return applied == null ? Optional.<V>empty() : Optional.of(function.apply(get()));
} el... | [
"public",
"<",
"V",
">",
"Optional",
"<",
"V",
">",
"map",
"(",
"final",
"Function",
"<",
"T",
",",
"V",
">",
"function",
")",
"{",
"checkNotNull",
"(",
"function",
",",
"\"Must provide non null function to map\"",
")",
";",
"if",
"(",
"isPresent",
"(",
... | If a value is present, map is with function, and if the result is non-null,
return an Optional describing the result. Otherwise return an empty Optional.
@param function a map function to apply to the value, if present
@param <V> The type of the result of the mapping function
@return an Optional describing the re... | [
"If",
"a",
"value",
"is",
"present",
"map",
"is",
"with",
"function",
"and",
"if",
"the",
"result",
"is",
"non",
"-",
"null",
"return",
"an",
"Optional",
"describing",
"the",
"result",
".",
"Otherwise",
"return",
"an",
"empty",
"Optional",
"."
] | a6cc7c73b2be475ed1bce5128c24b2eb9c27d666 | https://github.com/nwillc/almost-functional/blob/a6cc7c73b2be475ed1bce5128c24b2eb9c27d666/src/main/java/almost/functional/Optional.java#L209-L217 |
151,410 | aoindustries/ao-dao-base | src/main/java/com/aoindustries/dao/impl/Encryption.java | Encryption.hash | @Deprecated
public static String hash(String plaintext) throws WrappedException {
try {
MessageDigest md = MessageDigest.getInstance("SHA-1");
md.update(plaintext.getBytes("UTF-8"));
return hexEncode(md.digest());
} catch(NoSuchAlgorithmException | UnsupportedEncodingException e) {
throw new WrappedExc... | java | @Deprecated
public static String hash(String plaintext) throws WrappedException {
try {
MessageDigest md = MessageDigest.getInstance("SHA-1");
md.update(plaintext.getBytes("UTF-8"));
return hexEncode(md.digest());
} catch(NoSuchAlgorithmException | UnsupportedEncodingException e) {
throw new WrappedExc... | [
"@",
"Deprecated",
"public",
"static",
"String",
"hash",
"(",
"String",
"plaintext",
")",
"throws",
"WrappedException",
"{",
"try",
"{",
"MessageDigest",
"md",
"=",
"MessageDigest",
".",
"getInstance",
"(",
"\"SHA-1\"",
")",
";",
"md",
".",
"update",
"(",
"p... | Performs a one-way hash of the plaintext value using SHA-1.
@exception WrappedException if any problem occurs.
@deprecated Use salted algorithm, update database of stored passwords as passwords are validated
@see HashedPassword for proper password hashing
@see HashedKey for SHA-256 hashing | [
"Performs",
"a",
"one",
"-",
"way",
"hash",
"of",
"the",
"plaintext",
"value",
"using",
"SHA",
"-",
"1",
"."
] | b1cde7f8d976f2d1ab57d110a77e2399ffa595ac | https://github.com/aoindustries/ao-dao-base/blob/b1cde7f8d976f2d1ab57d110a77e2399ffa595ac/src/main/java/com/aoindustries/dao/impl/Encryption.java#L63-L72 |
151,411 | aoindustries/ao-dao-base | src/main/java/com/aoindustries/dao/impl/Encryption.java | Encryption.generateKey | public static String generateKey() {
byte[] bytes = new byte[32];
getRandom().nextBytes(bytes);
char[] chars = new char[64];
for(int c=0;c<32;c++) {
byte b = bytes[c];
chars[c*2]=hexChars[(b&255)>>>4];
chars[c*2+1]=hexChars[b&15];
}
return new String(chars);
} | java | public static String generateKey() {
byte[] bytes = new byte[32];
getRandom().nextBytes(bytes);
char[] chars = new char[64];
for(int c=0;c<32;c++) {
byte b = bytes[c];
chars[c*2]=hexChars[(b&255)>>>4];
chars[c*2+1]=hexChars[b&15];
}
return new String(chars);
} | [
"public",
"static",
"String",
"generateKey",
"(",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"32",
"]",
";",
"getRandom",
"(",
")",
".",
"nextBytes",
"(",
"bytes",
")",
";",
"char",
"[",
"]",
"chars",
"=",
"new",
"char",
"[",
"... | Generates a random key. | [
"Generates",
"a",
"random",
"key",
"."
] | b1cde7f8d976f2d1ab57d110a77e2399ffa595ac | https://github.com/aoindustries/ao-dao-base/blob/b1cde7f8d976f2d1ab57d110a77e2399ffa595ac/src/main/java/com/aoindustries/dao/impl/Encryption.java#L88-L98 |
151,412 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/types/DataConverter.java | DataConverter.encode | @SuppressWarnings({ "rawtypes", "unchecked"})
public static byte[] encode(final String attributeName, final Object obj) {
TypeConverter converter = DataConverter.attributeConverters
.get(attributeName);
if (converter == null) {
log.warn(
"Unable to find a suitable data converter for at... | java | @SuppressWarnings({ "rawtypes", "unchecked"})
public static byte[] encode(final String attributeName, final Object obj) {
TypeConverter converter = DataConverter.attributeConverters
.get(attributeName);
if (converter == null) {
log.warn(
"Unable to find a suitable data converter for at... | [
"@",
"SuppressWarnings",
"(",
"{",
"\"rawtypes\"",
",",
"\"unchecked\"",
"}",
")",
"public",
"static",
"byte",
"[",
"]",
"encode",
"(",
"final",
"String",
"attributeName",
",",
"final",
"Object",
"obj",
")",
"{",
"TypeConverter",
"converter",
"=",
"DataConvert... | Encodes attribute data into the standard binary representation for the
type.
@param attributeName the name of the attribute
@param obj the object to encode
@return the encoded form of the object as a byte[]. | [
"Encodes",
"attribute",
"data",
"into",
"the",
"standard",
"binary",
"representation",
"for",
"the",
"type",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/types/DataConverter.java#L110-L127 |
151,413 | OwlPlatform/java-owl-worldmodel | src/main/java/com/owlplatform/worldmodel/types/DataConverter.java | DataConverter.putConverter | public static TypeConverter<?> putConverter(final String attributeName,
final String type) {
TypeConverter<?> conv = DataConverter.converterClasses.get(type);
if (conv == null) {
log.warn("Could not find a converter for data type {}.", type);
throw new IllegalArgumentException(
"Coul... | java | public static TypeConverter<?> putConverter(final String attributeName,
final String type) {
TypeConverter<?> conv = DataConverter.converterClasses.get(type);
if (conv == null) {
log.warn("Could not find a converter for data type {}.", type);
throw new IllegalArgumentException(
"Coul... | [
"public",
"static",
"TypeConverter",
"<",
"?",
">",
"putConverter",
"(",
"final",
"String",
"attributeName",
",",
"final",
"String",
"type",
")",
"{",
"TypeConverter",
"<",
"?",
">",
"conv",
"=",
"DataConverter",
".",
"converterClasses",
".",
"get",
"(",
"ty... | Maps a converter for an Attribute name.
@param attributeName the name of the Attribute.
@param type the type of the Attribute (<i>e.g.</i>, "String", "Integer", "byte[]")
@return the converter that was mapped
@throws IllegalArgumentException if no converter is available for the type
@see #getSupportedTypes() | [
"Maps",
"a",
"converter",
"for",
"an",
"Attribute",
"name",
"."
] | a850e8b930c6e9787c7cad30c0de887858ca563d | https://github.com/OwlPlatform/java-owl-worldmodel/blob/a850e8b930c6e9787c7cad30c0de887858ca563d/src/main/java/com/owlplatform/worldmodel/types/DataConverter.java#L187-L196 |
151,414 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.addRelationshipToTarget | public void addRelationshipToTarget(final Level level, final RelationshipType type) {
final TargetRelationship relationship = new TargetRelationship(this, level, type);
levelRelationships.add(relationship);
relationships.add(relationship);
} | java | public void addRelationshipToTarget(final Level level, final RelationshipType type) {
final TargetRelationship relationship = new TargetRelationship(this, level, type);
levelRelationships.add(relationship);
relationships.add(relationship);
} | [
"public",
"void",
"addRelationshipToTarget",
"(",
"final",
"Level",
"level",
",",
"final",
"RelationshipType",
"type",
")",
"{",
"final",
"TargetRelationship",
"relationship",
"=",
"new",
"TargetRelationship",
"(",
"this",
",",
"level",
",",
"type",
")",
";",
"l... | Add a relationship to the target level.
@param level The target level that is to be related to.
@param type The type of the relationship. | [
"Add",
"a",
"relationship",
"to",
"the",
"target",
"level",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L107-L111 |
151,415 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.getPreviousRelationships | public List<Relationship> getPreviousRelationships() {
final List<Relationship> prevRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.PREVIOUS) {
prevRelationships.add(r);
}
}
... | java | public List<Relationship> getPreviousRelationships() {
final List<Relationship> prevRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.PREVIOUS) {
prevRelationships.add(r);
}
}
... | [
"public",
"List",
"<",
"Relationship",
">",
"getPreviousRelationships",
"(",
")",
"{",
"final",
"List",
"<",
"Relationship",
">",
"prevRelationships",
"=",
"new",
"LinkedList",
"<",
"Relationship",
">",
"(",
")",
";",
"for",
"(",
"final",
"Relationship",
"r",
... | Gets a list of previous relationships for the Topic. | [
"Gets",
"a",
"list",
"of",
"previous",
"relationships",
"for",
"the",
"Topic",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L138-L146 |
151,416 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.getNextRelationships | public List<Relationship> getNextRelationships() {
final List<Relationship> nextRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.NEXT) {
nextRelationships.add(r);
}
}
r... | java | public List<Relationship> getNextRelationships() {
final List<Relationship> nextRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.NEXT) {
nextRelationships.add(r);
}
}
r... | [
"public",
"List",
"<",
"Relationship",
">",
"getNextRelationships",
"(",
")",
"{",
"final",
"List",
"<",
"Relationship",
">",
"nextRelationships",
"=",
"new",
"LinkedList",
"<",
"Relationship",
">",
"(",
")",
";",
"for",
"(",
"final",
"Relationship",
"r",
":... | Gets a list of next relationships for the Topic. | [
"Gets",
"a",
"list",
"of",
"next",
"relationships",
"for",
"the",
"Topic",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L151-L159 |
151,417 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.getPrerequisiteRelationships | public List<Relationship> getPrerequisiteRelationships() {
final List<Relationship> prerequisiteRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.PREREQUISITE) {
prerequisiteRelationships.add(r);
... | java | public List<Relationship> getPrerequisiteRelationships() {
final List<Relationship> prerequisiteRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.PREREQUISITE) {
prerequisiteRelationships.add(r);
... | [
"public",
"List",
"<",
"Relationship",
">",
"getPrerequisiteRelationships",
"(",
")",
"{",
"final",
"List",
"<",
"Relationship",
">",
"prerequisiteRelationships",
"=",
"new",
"LinkedList",
"<",
"Relationship",
">",
"(",
")",
";",
"for",
"(",
"final",
"Relationsh... | Gets a list of prerequisite relationships for the topic. | [
"Gets",
"a",
"list",
"of",
"prerequisite",
"relationships",
"for",
"the",
"topic",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L164-L172 |
151,418 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.getRelatedRelationships | public List<Relationship> getRelatedRelationships() {
final List<Relationship> relatedRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.REFER_TO) {
relatedRelationships.add(r);
}
... | java | public List<Relationship> getRelatedRelationships() {
final List<Relationship> relatedRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.REFER_TO) {
relatedRelationships.add(r);
}
... | [
"public",
"List",
"<",
"Relationship",
">",
"getRelatedRelationships",
"(",
")",
"{",
"final",
"List",
"<",
"Relationship",
">",
"relatedRelationships",
"=",
"new",
"LinkedList",
"<",
"Relationship",
">",
"(",
")",
";",
"for",
"(",
"final",
"Relationship",
"r"... | Gets a list of related relationships for the topic. | [
"Gets",
"a",
"list",
"of",
"related",
"relationships",
"for",
"the",
"topic",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L177-L185 |
151,419 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.getLinkListRelationships | public List<Relationship> getLinkListRelationships() {
final List<Relationship> linkListRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.LINKLIST) {
linkListRelationships.add(r);
}
... | java | public List<Relationship> getLinkListRelationships() {
final List<Relationship> linkListRelationships = new LinkedList<Relationship>();
for (final Relationship r : relationships) {
if (r.getType() == RelationshipType.LINKLIST) {
linkListRelationships.add(r);
}
... | [
"public",
"List",
"<",
"Relationship",
">",
"getLinkListRelationships",
"(",
")",
"{",
"final",
"List",
"<",
"Relationship",
">",
"linkListRelationships",
"=",
"new",
"LinkedList",
"<",
"Relationship",
">",
"(",
")",
";",
"for",
"(",
"final",
"Relationship",
"... | Gets a list of link-list relationships for the topic. | [
"Gets",
"a",
"list",
"of",
"link",
"-",
"list",
"relationships",
"for",
"the",
"topic",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L190-L198 |
151,420 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.printRelationshipsWithLongSyntax | private boolean printRelationshipsWithLongSyntax(final List<Relationship> relationships) {
for (final Relationship relationship : relationships) {
if (relationship.getRelationshipTitle() != null && !relationship.getRelationshipTitle().trim().isEmpty()) {
return true;
}
... | java | private boolean printRelationshipsWithLongSyntax(final List<Relationship> relationships) {
for (final Relationship relationship : relationships) {
if (relationship.getRelationshipTitle() != null && !relationship.getRelationshipTitle().trim().isEmpty()) {
return true;
}
... | [
"private",
"boolean",
"printRelationshipsWithLongSyntax",
"(",
"final",
"List",
"<",
"Relationship",
">",
"relationships",
")",
"{",
"for",
"(",
"final",
"Relationship",
"relationship",
":",
"relationships",
")",
"{",
"if",
"(",
"relationship",
".",
"getRelationship... | Checks to see if a list of relationships should be printed using the long syntax.
@param relationships The list of relationships to be checked.
@return True if the relationships should be printed using the long syntax. | [
"Checks",
"to",
"see",
"if",
"a",
"list",
"of",
"relationships",
"should",
"be",
"printed",
"using",
"the",
"long",
"syntax",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L226-L234 |
151,421 | pressgang-ccms/PressGangCCMSContentSpec | src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java | SpecNodeWithRelationships.generateRelationshipText | protected String generateRelationshipText(final RelationshipType relationshipType, boolean shortSyntax, final String spacer) {
final StringBuilder retValue;
final List<Relationship> relationships;
// Create the relationship heading
if (relationshipType == RelationshipType.REFER_TO) {
... | java | protected String generateRelationshipText(final RelationshipType relationshipType, boolean shortSyntax, final String spacer) {
final StringBuilder retValue;
final List<Relationship> relationships;
// Create the relationship heading
if (relationshipType == RelationshipType.REFER_TO) {
... | [
"protected",
"String",
"generateRelationshipText",
"(",
"final",
"RelationshipType",
"relationshipType",
",",
"boolean",
"shortSyntax",
",",
"final",
"String",
"spacer",
")",
"{",
"final",
"StringBuilder",
"retValue",
";",
"final",
"List",
"<",
"Relationship",
">",
... | Creates the relationship text to be added to a topic's text.
@param relationshipType The type of relationship to generate the text for.
@param shortSyntax If the short relationship syntax should be used.
@param spacer The spacer that should be added to the start of every new line.
@return The generated ... | [
"Creates",
"the",
"relationship",
"text",
"to",
"be",
"added",
"to",
"a",
"topic",
"s",
"text",
"."
] | 2bc02e2971e4522b47a130fb7ae5a0f5ad377df1 | https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/SpecNodeWithRelationships.java#L244-L303 |
151,422 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/Env.java | Env.getFileFormat | public static final FileFormat getFileFormat(Path path, Map<String, ?> env)
{
FileFormat fmt = (FileFormat) env.get(FORMAT);
String filename = path.getFileName().toString();
if (fmt == null)
{
if (filename.endsWith(".tar.gz") || filename.endsWith(".tar") || filename... | java | public static final FileFormat getFileFormat(Path path, Map<String, ?> env)
{
FileFormat fmt = (FileFormat) env.get(FORMAT);
String filename = path.getFileName().toString();
if (fmt == null)
{
if (filename.endsWith(".tar.gz") || filename.endsWith(".tar") || filename... | [
"public",
"static",
"final",
"FileFormat",
"getFileFormat",
"(",
"Path",
"path",
",",
"Map",
"<",
"String",
",",
"?",
">",
"env",
")",
"{",
"FileFormat",
"fmt",
"=",
"(",
"FileFormat",
")",
"env",
".",
"get",
"(",
"FORMAT",
")",
";",
"String",
"filenam... | Returns FileFormat either from env or using default value which is TAR_GNU
for tar and CPIO_CRC for others.
@param path
@param env
@return | [
"Returns",
"FileFormat",
"either",
"from",
"env",
"or",
"using",
"default",
"value",
"which",
"is",
"TAR_GNU",
"for",
"tar",
"and",
"CPIO_CRC",
"for",
"others",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/Env.java#L81-L97 |
151,423 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/Env.java | Env.getFileAttributes | public static final FileAttribute<?>[] getFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[0];
}
return attrs;
} | java | public static final FileAttribute<?>[] getFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[0];
}
return attrs;
} | [
"public",
"static",
"final",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"getFileAttributes",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"env",
")",
"{",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"attrs",
"=",
"(",
"FileAttribute",
"<",
"?",
">",
"[",
... | Return file attributes from env or empty array. These attributes are used
in creating archive file. Because of zip-file-system crashes if trying to
open file system for not existing file.
@param env
@return | [
"Return",
"file",
"attributes",
"from",
"env",
"or",
"empty",
"array",
".",
"These",
"attributes",
"are",
"used",
"in",
"creating",
"archive",
"file",
".",
"Because",
"of",
"zip",
"-",
"file",
"-",
"system",
"crashes",
"if",
"trying",
"to",
"open",
"file",... | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/Env.java#L105-L113 |
151,424 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/Env.java | Env.getDefaultRegularFileAttributes | public static final FileAttribute<?>[] getDefaultRegularFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(DEFAULT_REGULAR_FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[]{
PosixFilePermissions.a... | java | public static final FileAttribute<?>[] getDefaultRegularFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(DEFAULT_REGULAR_FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[]{
PosixFilePermissions.a... | [
"public",
"static",
"final",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"getDefaultRegularFileAttributes",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"env",
")",
"{",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"attrs",
"=",
"(",
"FileAttribute",
"<",
"?",
... | Return default attributes for new regular file. Either from env or default
values.
@param env
@return | [
"Return",
"default",
"attributes",
"for",
"new",
"regular",
"file",
".",
"Either",
"from",
"env",
"or",
"default",
"values",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/Env.java#L120-L132 |
151,425 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/Env.java | Env.getDefaultDirectoryFileAttributes | public static final FileAttribute<?>[] getDefaultDirectoryFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(DEFAULT_DIRECTORY_FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[]{
PosixFilePermissio... | java | public static final FileAttribute<?>[] getDefaultDirectoryFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(DEFAULT_DIRECTORY_FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[]{
PosixFilePermissio... | [
"public",
"static",
"final",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"getDefaultDirectoryFileAttributes",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"env",
")",
"{",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"attrs",
"=",
"(",
"FileAttribute",
"<",
"?",... | Return default attributes for new directory. Either from env or default
values.
@param env
@return | [
"Return",
"default",
"attributes",
"for",
"new",
"directory",
".",
"Either",
"from",
"env",
"or",
"default",
"values",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/Env.java#L139-L151 |
151,426 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/Env.java | Env.getDefaultSymbolicLinkFileAttributes | public static final FileAttribute<?>[] getDefaultSymbolicLinkFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(DEFAULT_SYMBOLIC_LINK_FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[]{
PosixFilePe... | java | public static final FileAttribute<?>[] getDefaultSymbolicLinkFileAttributes(Map<String, ?> env)
{
FileAttribute<?>[] attrs = (FileAttribute<?>[]) env.get(DEFAULT_SYMBOLIC_LINK_FILE_ATTRIBUTES);
if (attrs == null)
{
attrs = new FileAttribute<?>[]{
PosixFilePe... | [
"public",
"static",
"final",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"getDefaultSymbolicLinkFileAttributes",
"(",
"Map",
"<",
"String",
",",
"?",
">",
"env",
")",
"{",
"FileAttribute",
"<",
"?",
">",
"[",
"]",
"attrs",
"=",
"(",
"FileAttribute",
"<",
"... | Return default attributes for new symbolic link. Either from env or default
values.
@param env
@return | [
"Return",
"default",
"attributes",
"for",
"new",
"symbolic",
"link",
".",
"Either",
"from",
"env",
"or",
"default",
"values",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/Env.java#L158-L170 |
151,427 | tvesalainen/util | vfs/src/main/java/org/vesalainen/vfs/Env.java | Env.getOpenOptions | public static final Set<? extends OpenOption> getOpenOptions(Path path, Map<String, ?> env) throws IOException
{
Set<? extends OpenOption> opts = (Set<? extends OpenOption>) env.get(OPEN_OPTIONS);
if (opts == null)
{
if (Files.exists(path) && Files.size(path) > 0)
... | java | public static final Set<? extends OpenOption> getOpenOptions(Path path, Map<String, ?> env) throws IOException
{
Set<? extends OpenOption> opts = (Set<? extends OpenOption>) env.get(OPEN_OPTIONS);
if (opts == null)
{
if (Files.exists(path) && Files.size(path) > 0)
... | [
"public",
"static",
"final",
"Set",
"<",
"?",
"extends",
"OpenOption",
">",
"getOpenOptions",
"(",
"Path",
"path",
",",
"Map",
"<",
"String",
",",
"?",
">",
"env",
")",
"throws",
"IOException",
"{",
"Set",
"<",
"?",
"extends",
"OpenOption",
">",
"opts",
... | Returns open-options. Returns from env if exists. Otherwise if file exists
and size greater than 0 returns READ or READ,WRITE.
@param path
@param env
@return
@throws IOException | [
"Returns",
"open",
"-",
"options",
".",
"Returns",
"from",
"env",
"if",
"exists",
".",
"Otherwise",
"if",
"file",
"exists",
"and",
"size",
"greater",
"than",
"0",
"returns",
"READ",
"or",
"READ",
"WRITE",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/vfs/src/main/java/org/vesalainen/vfs/Env.java#L179-L194 |
151,428 | sworisbreathing/sfmf4j | sfmf4j-nio2/src/main/java/com/github/sworisbreathing/sfmf4j/nio2/WatchServiceFileMonitorServiceImpl.java | WatchServiceFileMonitorServiceImpl.getWatchKeyForPath | private synchronized WatchKey getWatchKeyForPath(final String path) throws IOException {
WatchKey key = watchKeysByPath.get(path);
if (key == null) {
logger.debug("Lazy-instantiating watch key for path: {}", path);
key = Paths.get(path).register(watchService, interested_types);
... | java | private synchronized WatchKey getWatchKeyForPath(final String path) throws IOException {
WatchKey key = watchKeysByPath.get(path);
if (key == null) {
logger.debug("Lazy-instantiating watch key for path: {}", path);
key = Paths.get(path).register(watchService, interested_types);
... | [
"private",
"synchronized",
"WatchKey",
"getWatchKeyForPath",
"(",
"final",
"String",
"path",
")",
"throws",
"IOException",
"{",
"WatchKey",
"key",
"=",
"watchKeysByPath",
".",
"get",
"(",
"path",
")",
";",
"if",
"(",
"key",
"==",
"null",
")",
"{",
"logger",
... | Gets the watch key for a path with lazy initialization.
@param path the path
@return a registered watch key for the path
@throws IOException if lazy initialization fails | [
"Gets",
"the",
"watch",
"key",
"for",
"a",
"path",
"with",
"lazy",
"initialization",
"."
] | 826c2c02af69d55f98e64fbcfae23d0c7bac3f19 | https://github.com/sworisbreathing/sfmf4j/blob/826c2c02af69d55f98e64fbcfae23d0c7bac3f19/sfmf4j-nio2/src/main/java/com/github/sworisbreathing/sfmf4j/nio2/WatchServiceFileMonitorServiceImpl.java#L151-L161 |
151,429 | sworisbreathing/sfmf4j | sfmf4j-nio2/src/main/java/com/github/sworisbreathing/sfmf4j/nio2/WatchServiceFileMonitorServiceImpl.java | WatchServiceFileMonitorServiceImpl.resolveEventWithCorrectPath | private synchronized WatchEvent<Path> resolveEventWithCorrectPath(final WatchKey key, final WatchEvent<Path> event) {
Path correctPath = Paths.get(pathsByWatchKey.get(key));
return new ResolvedPathWatchEvent(event, correctPath);
} | java | private synchronized WatchEvent<Path> resolveEventWithCorrectPath(final WatchKey key, final WatchEvent<Path> event) {
Path correctPath = Paths.get(pathsByWatchKey.get(key));
return new ResolvedPathWatchEvent(event, correctPath);
} | [
"private",
"synchronized",
"WatchEvent",
"<",
"Path",
">",
"resolveEventWithCorrectPath",
"(",
"final",
"WatchKey",
"key",
",",
"final",
"WatchEvent",
"<",
"Path",
">",
"event",
")",
"{",
"Path",
"correctPath",
"=",
"Paths",
".",
"get",
"(",
"pathsByWatchKey",
... | Resolves a watch event with its absolute path.
@param key the watch key (used to look up the parent path)
@param event the event to resolve
@return a copy of the event, with a resolved path | [
"Resolves",
"a",
"watch",
"event",
"with",
"its",
"absolute",
"path",
"."
] | 826c2c02af69d55f98e64fbcfae23d0c7bac3f19 | https://github.com/sworisbreathing/sfmf4j/blob/826c2c02af69d55f98e64fbcfae23d0c7bac3f19/sfmf4j-nio2/src/main/java/com/github/sworisbreathing/sfmf4j/nio2/WatchServiceFileMonitorServiceImpl.java#L201-L204 |
151,430 | OwlPlatform/java-owl-solver | src/main/java/com/owlplatform/solver/SolverAggregatorConnection.java | SolverAggregatorConnection.getNextSample | public SampleMessage getNextSample() {
if (this.connected) {
try {
return this.sampleQueue.take();
} catch (InterruptedException e) {
log.error(
"Interrupted while waiting for next sample to arrive.",
e);
}
return null;
}
throw new IllegalStateException(
"Connection to the aggr... | java | public SampleMessage getNextSample() {
if (this.connected) {
try {
return this.sampleQueue.take();
} catch (InterruptedException e) {
log.error(
"Interrupted while waiting for next sample to arrive.",
e);
}
return null;
}
throw new IllegalStateException(
"Connection to the aggr... | [
"public",
"SampleMessage",
"getNextSample",
"(",
")",
"{",
"if",
"(",
"this",
".",
"connected",
")",
"{",
"try",
"{",
"return",
"this",
".",
"sampleQueue",
".",
"take",
"(",
")",
";",
"}",
"catch",
"(",
"InterruptedException",
"e",
")",
"{",
"log",
"."... | Returns the next sample from the Aggregator, blocking until it is
available if none are currently buffered. If the connection to the
aggregator has been completely shut down, then this method will throw an
IllegalStateException.
@return the next sample received from the Aggregator.
@throws IllegalStateException
if thi... | [
"Returns",
"the",
"next",
"sample",
"from",
"the",
"Aggregator",
"blocking",
"until",
"it",
"is",
"available",
"if",
"none",
"are",
"currently",
"buffered",
".",
"If",
"the",
"connection",
"to",
"the",
"aggregator",
"has",
"been",
"completely",
"shut",
"down",... | 53a1faabd63613c716203922cd52f871e5fedb9b | https://github.com/OwlPlatform/java-owl-solver/blob/53a1faabd63613c716203922cd52f871e5fedb9b/src/main/java/com/owlplatform/solver/SolverAggregatorConnection.java#L249-L263 |
151,431 | OwlPlatform/java-owl-solver | src/main/java/com/owlplatform/solver/SolverAggregatorConnection.java | SolverAggregatorConnection.addRule | public int addRule(final SubscriptionRequestRule rule) {
Integer theRuleNum = Integer.valueOf(this.nextRuleNum.getAndIncrement());
synchronized (this.ruleMap) {
if (!this.ruleMap.values().contains(rule)) {
this.ruleMap.put(theRuleNum, rule);
SubscriptionRequestRule[] newRules = this.ruleMap.values()... | java | public int addRule(final SubscriptionRequestRule rule) {
Integer theRuleNum = Integer.valueOf(this.nextRuleNum.getAndIncrement());
synchronized (this.ruleMap) {
if (!this.ruleMap.values().contains(rule)) {
this.ruleMap.put(theRuleNum, rule);
SubscriptionRequestRule[] newRules = this.ruleMap.values()... | [
"public",
"int",
"addRule",
"(",
"final",
"SubscriptionRequestRule",
"rule",
")",
"{",
"Integer",
"theRuleNum",
"=",
"Integer",
".",
"valueOf",
"(",
"this",
".",
"nextRuleNum",
".",
"getAndIncrement",
"(",
")",
")",
";",
"synchronized",
"(",
"this",
".",
"ru... | Adds a Subscription Request Rule to the aggregator interface. If the
aggregator is already connected, the rule will be sent immediately,
otherwise it will be sent with all rules when the aggregator is
connected.
@param rule
the rule to add to this aggregator.
@return the rule number, which can be used later to remove ... | [
"Adds",
"a",
"Subscription",
"Request",
"Rule",
"to",
"the",
"aggregator",
"interface",
".",
"If",
"the",
"aggregator",
"is",
"already",
"connected",
"the",
"rule",
"will",
"be",
"sent",
"immediately",
"otherwise",
"it",
"will",
"be",
"sent",
"with",
"all",
... | 53a1faabd63613c716203922cd52f871e5fedb9b | https://github.com/OwlPlatform/java-owl-solver/blob/53a1faabd63613c716203922cd52f871e5fedb9b/src/main/java/com/owlplatform/solver/SolverAggregatorConnection.java#L300-L320 |
151,432 | OwlPlatform/java-owl-solver | src/main/java/com/owlplatform/solver/SolverAggregatorConnection.java | SolverAggregatorConnection.sampleReceived | void sampleReceived(SolverAggregatorInterface aggregator,
SampleMessage sample) {
if (!this.sampleQueue.offer(sample) && this.warnBufferFull) {
log.warn("Unable to insert a sample due to a full buffer.");
}
} | java | void sampleReceived(SolverAggregatorInterface aggregator,
SampleMessage sample) {
if (!this.sampleQueue.offer(sample) && this.warnBufferFull) {
log.warn("Unable to insert a sample due to a full buffer.");
}
} | [
"void",
"sampleReceived",
"(",
"SolverAggregatorInterface",
"aggregator",
",",
"SampleMessage",
"sample",
")",
"{",
"if",
"(",
"!",
"this",
".",
"sampleQueue",
".",
"offer",
"(",
"sample",
")",
"&&",
"this",
".",
"warnBufferFull",
")",
"{",
"log",
".",
"warn... | Called when the aggregator sends a sample. Enqueues the sample into the internal buffer.
@param aggregator the aggregator that sent the sample.
@param sample the sample that was sent. | [
"Called",
"when",
"the",
"aggregator",
"sends",
"a",
"sample",
".",
"Enqueues",
"the",
"sample",
"into",
"the",
"internal",
"buffer",
"."
] | 53a1faabd63613c716203922cd52f871e5fedb9b | https://github.com/OwlPlatform/java-owl-solver/blob/53a1faabd63613c716203922cd52f871e5fedb9b/src/main/java/com/owlplatform/solver/SolverAggregatorConnection.java#L391-L396 |
151,433 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getDefaultVersion | public String getDefaultVersion()
{
Record recMessageVersion = ((ReferenceField)this.getRecord(MessageControl.MESSAGE_CONTROL_FILE).getField(MessageControl.DEFAULT_VERSION_ID)).getReference();
if (recMessageVersion != null)
if ((recMessageVersion.getEditMode() == DBConstants.EDIT_CURRENT... | java | public String getDefaultVersion()
{
Record recMessageVersion = ((ReferenceField)this.getRecord(MessageControl.MESSAGE_CONTROL_FILE).getField(MessageControl.DEFAULT_VERSION_ID)).getReference();
if (recMessageVersion != null)
if ((recMessageVersion.getEditMode() == DBConstants.EDIT_CURRENT... | [
"public",
"String",
"getDefaultVersion",
"(",
")",
"{",
"Record",
"recMessageVersion",
"=",
"(",
"(",
"ReferenceField",
")",
"this",
".",
"getRecord",
"(",
"MessageControl",
".",
"MESSAGE_CONTROL_FILE",
")",
".",
"getField",
"(",
"MessageControl",
".",
"DEFAULT_VE... | GetDefaultVersion Method. | [
"GetDefaultVersion",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L144-L151 |
151,434 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.scanProcesses | public void scanProcesses(Object typeObject, OperationType type)
{
String strTargetVersion = this.getProperty("version");
if (strTargetVersion == null)
strTargetVersion = this.getDefaultVersion();
Record recMessageTransport = ((ReferenceField)this.getRecord(MessageControl.MESSAGE... | java | public void scanProcesses(Object typeObject, OperationType type)
{
String strTargetVersion = this.getProperty("version");
if (strTargetVersion == null)
strTargetVersion = this.getDefaultVersion();
Record recMessageTransport = ((ReferenceField)this.getRecord(MessageControl.MESSAGE... | [
"public",
"void",
"scanProcesses",
"(",
"Object",
"typeObject",
",",
"OperationType",
"type",
")",
"{",
"String",
"strTargetVersion",
"=",
"this",
".",
"getProperty",
"(",
"\"version\"",
")",
";",
"if",
"(",
"strTargetVersion",
"==",
"null",
")",
"strTargetVersi... | ScanProcesses Method. | [
"ScanProcesses",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L155-L209 |
151,435 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getControlProperty | public String getControlProperty(String strKey, String strDefaultValue)
{
String strValue = ((PropertiesField)this.getRecord(MessageControl.MESSAGE_CONTROL_FILE).getField(MessageControl.PROPERTIES)).getProperty(strKey);
if (strValue == null)
{
if (strDefaultValue == null)
... | java | public String getControlProperty(String strKey, String strDefaultValue)
{
String strValue = ((PropertiesField)this.getRecord(MessageControl.MESSAGE_CONTROL_FILE).getField(MessageControl.PROPERTIES)).getProperty(strKey);
if (strValue == null)
{
if (strDefaultValue == null)
... | [
"public",
"String",
"getControlProperty",
"(",
"String",
"strKey",
",",
"String",
"strDefaultValue",
")",
"{",
"String",
"strValue",
"=",
"(",
"(",
"PropertiesField",
")",
"this",
".",
"getRecord",
"(",
"MessageControl",
".",
"MESSAGE_CONTROL_FILE",
")",
".",
"g... | GetControlProperty Method. | [
"GetControlProperty",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L227-L237 |
151,436 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getDefaultValue | public String getDefaultValue(String strKey)
{
if (DESCRIPTIONS == null)
DESCRIPTIONS = Utility.arrayToMap(DEFAULTS);
return (String)DESCRIPTIONS.get(strKey);
} | java | public String getDefaultValue(String strKey)
{
if (DESCRIPTIONS == null)
DESCRIPTIONS = Utility.arrayToMap(DEFAULTS);
return (String)DESCRIPTIONS.get(strKey);
} | [
"public",
"String",
"getDefaultValue",
"(",
"String",
"strKey",
")",
"{",
"if",
"(",
"DESCRIPTIONS",
"==",
"null",
")",
"DESCRIPTIONS",
"=",
"Utility",
".",
"arrayToMap",
"(",
"DEFAULTS",
")",
";",
"return",
"(",
"String",
")",
"DESCRIPTIONS",
".",
"get",
... | GetDefaultValue Method. | [
"GetDefaultValue",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L241-L246 |
151,437 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getURIProperty | public String getURIProperty(String strKey, String strDefaultValue)
{
String strValue = this.getControlProperty(strKey, strDefaultValue);
return this.getURIValue(strValue);
} | java | public String getURIProperty(String strKey, String strDefaultValue)
{
String strValue = this.getControlProperty(strKey, strDefaultValue);
return this.getURIValue(strValue);
} | [
"public",
"String",
"getURIProperty",
"(",
"String",
"strKey",
",",
"String",
"strDefaultValue",
")",
"{",
"String",
"strValue",
"=",
"this",
".",
"getControlProperty",
"(",
"strKey",
",",
"strDefaultValue",
")",
";",
"return",
"this",
".",
"getURIValue",
"(",
... | GetURIProperty Method. | [
"GetURIProperty",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L257-L261 |
151,438 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getURIValue | public String getURIValue(String strValue)
{
String strBaseURI = ((PropertiesField)this.getRecord(MessageControl.MESSAGE_CONTROL_FILE).getField(MessageControl.PROPERTIES)).getProperty(MessageControl.BASE_NAMESPACE_URI);
if (strBaseURI == null)
{
strBaseURI = this.getProperty(DBPa... | java | public String getURIValue(String strValue)
{
String strBaseURI = ((PropertiesField)this.getRecord(MessageControl.MESSAGE_CONTROL_FILE).getField(MessageControl.PROPERTIES)).getProperty(MessageControl.BASE_NAMESPACE_URI);
if (strBaseURI == null)
{
strBaseURI = this.getProperty(DBPa... | [
"public",
"String",
"getURIValue",
"(",
"String",
"strValue",
")",
"{",
"String",
"strBaseURI",
"=",
"(",
"(",
"PropertiesField",
")",
"this",
".",
"getRecord",
"(",
"MessageControl",
".",
"MESSAGE_CONTROL_FILE",
")",
".",
"getField",
"(",
"MessageControl",
".",... | GetURIValue Method. | [
"GetURIValue",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L265-L287 |
151,439 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getMessageIn | public MessageInfo getMessageIn(MessageProcessInfo recMessageProcessInfo)
{
return (MessageInfo)((ReferenceField)recMessageProcessInfo.getField(MessageProcessInfo.MESSAGE_INFO_ID)).getReference();
} | java | public MessageInfo getMessageIn(MessageProcessInfo recMessageProcessInfo)
{
return (MessageInfo)((ReferenceField)recMessageProcessInfo.getField(MessageProcessInfo.MESSAGE_INFO_ID)).getReference();
} | [
"public",
"MessageInfo",
"getMessageIn",
"(",
"MessageProcessInfo",
"recMessageProcessInfo",
")",
"{",
"return",
"(",
"MessageInfo",
")",
"(",
"(",
"ReferenceField",
")",
"recMessageProcessInfo",
".",
"getField",
"(",
"MessageProcessInfo",
".",
"MESSAGE_INFO_ID",
")",
... | GetMessageIn Method. | [
"GetMessageIn",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L291-L294 |
151,440 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getMessageOut | public MessageInfo getMessageOut(MessageProcessInfo recMessageProcessInfo)
{
MessageProcessInfo recMessageProcessInfo2 = (MessageProcessInfo)((ReferenceField)recMessageProcessInfo.getField(MessageProcessInfo.REPLY_MESSAGE_PROCESS_INFO_ID)).getReference();
if (recMessageProcessInfo2 != null)
... | java | public MessageInfo getMessageOut(MessageProcessInfo recMessageProcessInfo)
{
MessageProcessInfo recMessageProcessInfo2 = (MessageProcessInfo)((ReferenceField)recMessageProcessInfo.getField(MessageProcessInfo.REPLY_MESSAGE_PROCESS_INFO_ID)).getReference();
if (recMessageProcessInfo2 != null)
... | [
"public",
"MessageInfo",
"getMessageOut",
"(",
"MessageProcessInfo",
"recMessageProcessInfo",
")",
"{",
"MessageProcessInfo",
"recMessageProcessInfo2",
"=",
"(",
"MessageProcessInfo",
")",
"(",
"(",
"ReferenceField",
")",
"recMessageProcessInfo",
".",
"getField",
"(",
"Me... | GetMessageOut Method. | [
"GetMessageOut",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L298-L304 |
151,441 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.fixName | public String fixName(String name)
{
for (int i = 0; i < name.length(); i++)
{
if (Character.isWhitespace(name.charAt(i)))
name = name.substring(0, i) + name.substring(i + 1);
}
return name;
} | java | public String fixName(String name)
{
for (int i = 0; i < name.length(); i++)
{
if (Character.isWhitespace(name.charAt(i)))
name = name.substring(0, i) + name.substring(i + 1);
}
return name;
} | [
"public",
"String",
"fixName",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"name",
".",
"length",
"(",
")",
";",
"i",
"++",
")",
"{",
"if",
"(",
"Character",
".",
"isWhitespace",
"(",
"name",
".",
"charAt",
... | FixName Method. | [
"FixName",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L308-L316 |
151,442 | jbundle/jbundle | main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java | CreateWSDL.getNamespace | public String getNamespace()
{
String strTargetVersion = this.getProperty("version");
if (strTargetVersion == null)
strTargetVersion = this.getDefaultVersion();
return this.getMessageControl().getNamespaceFromVersion(strTargetVersion);
} | java | public String getNamespace()
{
String strTargetVersion = this.getProperty("version");
if (strTargetVersion == null)
strTargetVersion = this.getDefaultVersion();
return this.getMessageControl().getNamespaceFromVersion(strTargetVersion);
} | [
"public",
"String",
"getNamespace",
"(",
")",
"{",
"String",
"strTargetVersion",
"=",
"this",
".",
"getProperty",
"(",
"\"version\"",
")",
";",
"if",
"(",
"strTargetVersion",
"==",
"null",
")",
"strTargetVersion",
"=",
"this",
".",
"getDefaultVersion",
"(",
")... | GetNamespace Method. | [
"GetNamespace",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/msg.wsdl/src/main/java/org/jbundle/main/msg/wsdl/CreateWSDL.java#L328-L334 |
151,443 | jbundle/jbundle | app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java | ProjectTask.linkLastPredecessor | public boolean linkLastPredecessor(Record recNewProjectTask, boolean bDisplayOption)
{
if ((recNewProjectTask == null)
|| (recNewProjectTask.getEditMode() != DBConstants.EDIT_ADD))
return false; // Being careful
Object bookmark = recNewProjectTask.getLastModified(DBConsta... | java | public boolean linkLastPredecessor(Record recNewProjectTask, boolean bDisplayOption)
{
if ((recNewProjectTask == null)
|| (recNewProjectTask.getEditMode() != DBConstants.EDIT_ADD))
return false; // Being careful
Object bookmark = recNewProjectTask.getLastModified(DBConsta... | [
"public",
"boolean",
"linkLastPredecessor",
"(",
"Record",
"recNewProjectTask",
",",
"boolean",
"bDisplayOption",
")",
"{",
"if",
"(",
"(",
"recNewProjectTask",
"==",
"null",
")",
"||",
"(",
"recNewProjectTask",
".",
"getEditMode",
"(",
")",
"!=",
"DBConstants",
... | LinkLastPredecessor Method. | [
"LinkLastPredecessor",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java#L310-L362 |
151,444 | jbundle/jbundle | app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java | ProjectTask.updateChildren | public boolean updateChildren(boolean bDisplayOption)
{
int iMoveMode = DBConstants.SCREEN_MOVE;
ProjectTask recDetailChildren = this.getDetailChildren();
Date startDate = ((DateTimeField)this.getField(ProjectTask.START_DATE_TIME)).getDateTime();
Date endDate = ((DateTimeField)this.g... | java | public boolean updateChildren(boolean bDisplayOption)
{
int iMoveMode = DBConstants.SCREEN_MOVE;
ProjectTask recDetailChildren = this.getDetailChildren();
Date startDate = ((DateTimeField)this.getField(ProjectTask.START_DATE_TIME)).getDateTime();
Date endDate = ((DateTimeField)this.g... | [
"public",
"boolean",
"updateChildren",
"(",
"boolean",
"bDisplayOption",
")",
"{",
"int",
"iMoveMode",
"=",
"DBConstants",
".",
"SCREEN_MOVE",
";",
"ProjectTask",
"recDetailChildren",
"=",
"this",
".",
"getDetailChildren",
"(",
")",
";",
"Date",
"startDate",
"=",
... | UpdateChildren Method. | [
"UpdateChildren",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java#L366-L407 |
151,445 | jbundle/jbundle | app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java | ProjectTask.surveyDates | public boolean surveyDates(boolean bDisplayOption)
{
if (m_recDetail == null)
{
RecordOwner recordOwner = this.getRecordOwner();
m_recDetail = new ProjectTask(recordOwner);
if (recordOwner != null)
recordOwner.removeRecord(m_recDetail);
... | java | public boolean surveyDates(boolean bDisplayOption)
{
if (m_recDetail == null)
{
RecordOwner recordOwner = this.getRecordOwner();
m_recDetail = new ProjectTask(recordOwner);
if (recordOwner != null)
recordOwner.removeRecord(m_recDetail);
... | [
"public",
"boolean",
"surveyDates",
"(",
"boolean",
"bDisplayOption",
")",
"{",
"if",
"(",
"m_recDetail",
"==",
"null",
")",
"{",
"RecordOwner",
"recordOwner",
"=",
"this",
".",
"getRecordOwner",
"(",
")",
";",
"m_recDetail",
"=",
"new",
"ProjectTask",
"(",
... | SurveyDates Method. | [
"SurveyDates",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java#L519-L575 |
151,446 | jbundle/jbundle | app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java | ProjectTask.getProjectTaskPredecessor | public ProjectTaskPredecessor getProjectTaskPredecessor()
{
if (m_recProjectTaskPredecessor == null)
{
m_recProjectTaskPredecessor = new ProjectTaskPredecessor(this.getRecordOwner());
// Must have the sub-records set up in advance to EEP them from mixing with this record.
... | java | public ProjectTaskPredecessor getProjectTaskPredecessor()
{
if (m_recProjectTaskPredecessor == null)
{
m_recProjectTaskPredecessor = new ProjectTaskPredecessor(this.getRecordOwner());
// Must have the sub-records set up in advance to EEP them from mixing with this record.
... | [
"public",
"ProjectTaskPredecessor",
"getProjectTaskPredecessor",
"(",
")",
"{",
"if",
"(",
"m_recProjectTaskPredecessor",
"==",
"null",
")",
"{",
"m_recProjectTaskPredecessor",
"=",
"new",
"ProjectTaskPredecessor",
"(",
"this",
".",
"getRecordOwner",
"(",
")",
")",
";... | GetProjectTaskPredecessor Method. | [
"GetProjectTaskPredecessor",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java#L579-L589 |
151,447 | jbundle/jbundle | app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java | ProjectTask.getDetailChildren | public ProjectTask getDetailChildren()
{
if (m_recDetailChildren == null)
{
RecordOwner recordOwner = this.getRecordOwner();
m_recDetailChildren = new ProjectTask(recordOwner);
if (recordOwner != null)
recordOwner.removeRecord(m_recDetailChildren);... | java | public ProjectTask getDetailChildren()
{
if (m_recDetailChildren == null)
{
RecordOwner recordOwner = this.getRecordOwner();
m_recDetailChildren = new ProjectTask(recordOwner);
if (recordOwner != null)
recordOwner.removeRecord(m_recDetailChildren);... | [
"public",
"ProjectTask",
"getDetailChildren",
"(",
")",
"{",
"if",
"(",
"m_recDetailChildren",
"==",
"null",
")",
"{",
"RecordOwner",
"recordOwner",
"=",
"this",
".",
"getRecordOwner",
"(",
")",
";",
"m_recDetailChildren",
"=",
"new",
"ProjectTask",
"(",
"record... | GetDetailChildren Method. | [
"GetDetailChildren",
"Method",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/app/program/project/src/main/java/org/jbundle/app/program/project/db/ProjectTask.java#L600-L611 |
151,448 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/field/event/InitIfSubFieldHandler.java | InitIfSubFieldHandler.doSetData | public int doSetData(Object fieldPtr, boolean bDisplayOption, int iMoveMode)
{
int iErrorCode = DBConstants.NORMAL_RETURN;
boolean bSubExists = (this.getOwner().getRecord().getListener(SubFileFilter.class.getName()) != null);
if (bSubExists)
iErrorCode = super.doSetData(fieldPtr,... | java | public int doSetData(Object fieldPtr, boolean bDisplayOption, int iMoveMode)
{
int iErrorCode = DBConstants.NORMAL_RETURN;
boolean bSubExists = (this.getOwner().getRecord().getListener(SubFileFilter.class.getName()) != null);
if (bSubExists)
iErrorCode = super.doSetData(fieldPtr,... | [
"public",
"int",
"doSetData",
"(",
"Object",
"fieldPtr",
",",
"boolean",
"bDisplayOption",
",",
"int",
"iMoveMode",
")",
"{",
"int",
"iErrorCode",
"=",
"DBConstants",
".",
"NORMAL_RETURN",
";",
"boolean",
"bSubExists",
"=",
"(",
"this",
".",
"getOwner",
"(",
... | Move the physical binary data to this field.
If there is not SubFileFilter, then don't allow the field to be inited.
@param objData the raw data to set the basefield to.
@param bDisplayOption If true, display the change.
@param iMoveMode The type of move being done (init/read/screen).
@return The error code (or NORMAL_... | [
"Move",
"the",
"physical",
"binary",
"data",
"to",
"this",
"field",
".",
"If",
"there",
"is",
"not",
"SubFileFilter",
"then",
"don",
"t",
"allow",
"the",
"field",
"to",
"be",
"inited",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/event/InitIfSubFieldHandler.java#L61-L68 |
151,449 | jbundle/jbundle | base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XButtonBox.java | XButtonBox.isSingleDataImage | public boolean isSingleDataImage()
{
if (this.getScreenField().getConverter() != null)
if (this.getScreenField().getConverter().getField() != null)
if (this.getScreenField().getConverter().getField().getComponent(1) == null)
return true;
return false;
} | java | public boolean isSingleDataImage()
{
if (this.getScreenField().getConverter() != null)
if (this.getScreenField().getConverter().getField() != null)
if (this.getScreenField().getConverter().getField().getComponent(1) == null)
return true;
return false;
} | [
"public",
"boolean",
"isSingleDataImage",
"(",
")",
"{",
"if",
"(",
"this",
".",
"getScreenField",
"(",
")",
".",
"getConverter",
"(",
")",
"!=",
"null",
")",
"if",
"(",
"this",
".",
"getScreenField",
"(",
")",
".",
"getConverter",
"(",
")",
".",
"getF... | Special case - if this button is linked to data and this is the only sfield, then display it.
@return | [
"Special",
"case",
"-",
"if",
"this",
"button",
"is",
"linked",
"to",
"data",
"and",
"this",
"is",
"the",
"only",
"sfield",
"then",
"display",
"it",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/xml/src/main/java/org/jbundle/base/screen/view/xml/XButtonBox.java#L84-L91 |
151,450 | fuinorg/utils4swing | src/main/java/org/fuin/utils4swing/dialogs/DirectorySelector.java | DirectorySelector.ok | protected final void ok() {
final String dir = panel.getDirectory();
final boolean include = panel.isIncludeSubdirs();
close();
listener.finished(dir, include);
} | java | protected final void ok() {
final String dir = panel.getDirectory();
final boolean include = panel.isIncludeSubdirs();
close();
listener.finished(dir, include);
} | [
"protected",
"final",
"void",
"ok",
"(",
")",
"{",
"final",
"String",
"dir",
"=",
"panel",
".",
"getDirectory",
"(",
")",
";",
"final",
"boolean",
"include",
"=",
"panel",
".",
"isIncludeSubdirs",
"(",
")",
";",
"close",
"(",
")",
";",
"listener",
".",... | The dialog was successfully finished. | [
"The",
"dialog",
"was",
"successfully",
"finished",
"."
] | 560fb69eac182e3473de9679c3c15433e524ef6b | https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/dialogs/DirectorySelector.java#L183-L188 |
151,451 | fuinorg/utils4swing | src/main/java/org/fuin/utils4swing/dialogs/DirectorySelector.java | DirectorySelector.main | public static void main(final String[] args) throws IOException {
Utils4Swing.initSystemLookAndFeel();
DirectorySelector.Result result;
try {
result = DirectorySelector.selectDirectory(
"Please select the destination directory:", new File(".")
.getCanonicalPath(), true);
System.out.printl... | java | public static void main(final String[] args) throws IOException {
Utils4Swing.initSystemLookAndFeel();
DirectorySelector.Result result;
try {
result = DirectorySelector.selectDirectory(
"Please select the destination directory:", new File(".")
.getCanonicalPath(), true);
System.out.printl... | [
"public",
"static",
"void",
"main",
"(",
"final",
"String",
"[",
"]",
"args",
")",
"throws",
"IOException",
"{",
"Utils4Swing",
".",
"initSystemLookAndFeel",
"(",
")",
";",
"DirectorySelector",
".",
"Result",
"result",
";",
"try",
"{",
"result",
"=",
"Direct... | Starts the selector for a test.
@param args
Not used.
@throws IOException
Error creating the canonical path for the current directory. | [
"Starts",
"the",
"selector",
"for",
"a",
"test",
"."
] | 560fb69eac182e3473de9679c3c15433e524ef6b | https://github.com/fuinorg/utils4swing/blob/560fb69eac182e3473de9679c3c15433e524ef6b/src/main/java/org/fuin/utils4swing/dialogs/DirectorySelector.java#L358-L370 |
151,452 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/message/ReceiveQueueSession.java | ReceiveQueueSession.handleMessage | public int handleMessage(BaseMessage message)
{
Utility.getLogger().info("RemoteQueue handling message " + message);
if (message.getProcessedByClientSession() == this.getParentSession())
return DBConstants.NORMAL_RETURN; // Do not process this message (the client has already taken ca... | java | public int handleMessage(BaseMessage message)
{
Utility.getLogger().info("RemoteQueue handling message " + message);
if (message.getProcessedByClientSession() == this.getParentSession())
return DBConstants.NORMAL_RETURN; // Do not process this message (the client has already taken ca... | [
"public",
"int",
"handleMessage",
"(",
"BaseMessage",
"message",
")",
"{",
"Utility",
".",
"getLogger",
"(",
")",
".",
"info",
"(",
"\"RemoteQueue handling message \"",
"+",
"message",
")",
";",
"if",
"(",
"message",
".",
"getProcessedByClientSession",
"(",
")",... | Listen for messages.
@param message The message to send back to the client. | [
"Listen",
"for",
"messages",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/message/ReceiveQueueSession.java#L133-L147 |
151,453 | jbundle/jbundle | base/remote/src/main/java/org/jbundle/base/remote/message/ReceiveQueueSession.java | ReceiveQueueSession.addRemoteMessageFilter | public BaseMessageFilter addRemoteMessageFilter(BaseMessageFilter messageFilter, RemoteSession remoteSession) throws RemoteException
{
BaseMessageFilter remoteFilter = messageFilter; // The actual remote filter.
messageFilter.setRegistryID(null); // The needs to be null to add this filter to the re... | java | public BaseMessageFilter addRemoteMessageFilter(BaseMessageFilter messageFilter, RemoteSession remoteSession) throws RemoteException
{
BaseMessageFilter remoteFilter = messageFilter; // The actual remote filter.
messageFilter.setRegistryID(null); // The needs to be null to add this filter to the re... | [
"public",
"BaseMessageFilter",
"addRemoteMessageFilter",
"(",
"BaseMessageFilter",
"messageFilter",
",",
"RemoteSession",
"remoteSession",
")",
"throws",
"RemoteException",
"{",
"BaseMessageFilter",
"remoteFilter",
"=",
"messageFilter",
";",
"// The actual remote filter.",
"mes... | Given a copy of the client's message filter, set up a remote filter.
@param messageFilter The message filter.
@param remoteSession The remote session.
@return The message filter. | [
"Given",
"a",
"copy",
"of",
"the",
"client",
"s",
"message",
"filter",
"set",
"up",
"a",
"remote",
"filter",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/remote/src/main/java/org/jbundle/base/remote/message/ReceiveQueueSession.java#L154-L179 |
151,454 | tvesalainen/util | util/src/main/java/org/vesalainen/net/ExceptionParser.java | ExceptionParser.brokenConnection | public static final Level brokenConnection(Level level, Throwable thr)
{
if (thr instanceof EOFException)
{
return level;
}
if (thr instanceof ClosedChannelException)
{
return level;
}
if ((thr instanceof IOException) && (
... | java | public static final Level brokenConnection(Level level, Throwable thr)
{
if (thr instanceof EOFException)
{
return level;
}
if (thr instanceof ClosedChannelException)
{
return level;
}
if ((thr instanceof IOException) && (
... | [
"public",
"static",
"final",
"Level",
"brokenConnection",
"(",
"Level",
"level",
",",
"Throwable",
"thr",
")",
"{",
"if",
"(",
"thr",
"instanceof",
"EOFException",
")",
"{",
"return",
"level",
";",
"}",
"if",
"(",
"thr",
"instanceof",
"ClosedChannelException",... | Tries to detect if Throwable is caused by broken connection. If detected
returns level, else return SEVERE.
@param level
@param thr
@return | [
"Tries",
"to",
"detect",
"if",
"Throwable",
"is",
"caused",
"by",
"broken",
"connection",
".",
"If",
"detected",
"returns",
"level",
"else",
"return",
"SEVERE",
"."
] | bba7a44689f638ffabc8be40a75bdc9a33676433 | https://github.com/tvesalainen/util/blob/bba7a44689f638ffabc8be40a75bdc9a33676433/util/src/main/java/org/vesalainen/net/ExceptionParser.java#L38-L70 |
151,455 | carewebframework/carewebframework-vista | org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java | AsyncRPCEventDispatcher.callRPCAsync | public int callRPCAsync(String rpcName, Object... args) {
abort();
this.rpcName = rpcName;
asyncHandle = broker.callRPCAsync(rpcName, this, args);
return asyncHandle;
} | java | public int callRPCAsync(String rpcName, Object... args) {
abort();
this.rpcName = rpcName;
asyncHandle = broker.callRPCAsync(rpcName, this, args);
return asyncHandle;
} | [
"public",
"int",
"callRPCAsync",
"(",
"String",
"rpcName",
",",
"Object",
"...",
"args",
")",
"{",
"abort",
"(",
")",
";",
"this",
".",
"rpcName",
"=",
"rpcName",
";",
"asyncHandle",
"=",
"broker",
".",
"callRPCAsync",
"(",
"rpcName",
",",
"this",
",",
... | Make an asynchronous call.
@param rpcName The RPC name.
@param args The RPC arguments.
@return The async handle. | [
"Make",
"an",
"asynchronous",
"call",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java#L66-L71 |
151,456 | carewebframework/carewebframework-vista | org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java | AsyncRPCEventDispatcher.abort | public void abort() {
if (asyncHandle != 0) {
int handle = asyncHandle;
asyncHandle = 0;
broker.callRPCAbort(handle);
ZKUtil.fireEvent(new AsyncRPCAbortEvent(rpcName, target, handle));
rpcName = null;
}
} | java | public void abort() {
if (asyncHandle != 0) {
int handle = asyncHandle;
asyncHandle = 0;
broker.callRPCAbort(handle);
ZKUtil.fireEvent(new AsyncRPCAbortEvent(rpcName, target, handle));
rpcName = null;
}
} | [
"public",
"void",
"abort",
"(",
")",
"{",
"if",
"(",
"asyncHandle",
"!=",
"0",
")",
"{",
"int",
"handle",
"=",
"asyncHandle",
";",
"asyncHandle",
"=",
"0",
";",
"broker",
".",
"callRPCAbort",
"(",
"handle",
")",
";",
"ZKUtil",
".",
"fireEvent",
"(",
... | Abort any asynchronous RPC in progress. | [
"Abort",
"any",
"asynchronous",
"RPC",
"in",
"progress",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java#L76-L84 |
151,457 | carewebframework/carewebframework-vista | org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java | AsyncRPCEventDispatcher.onRPCComplete | @Override
public void onRPCComplete(int handle, String data) {
if (handle == asyncHandle) {
asyncHandle = 0;
ZKUtil.fireEvent(new AsyncRPCCompleteEvent(rpcName, target, data, handle));
rpcName = null;
}
} | java | @Override
public void onRPCComplete(int handle, String data) {
if (handle == asyncHandle) {
asyncHandle = 0;
ZKUtil.fireEvent(new AsyncRPCCompleteEvent(rpcName, target, data, handle));
rpcName = null;
}
} | [
"@",
"Override",
"public",
"void",
"onRPCComplete",
"(",
"int",
"handle",
",",
"String",
"data",
")",
"{",
"if",
"(",
"handle",
"==",
"asyncHandle",
")",
"{",
"asyncHandle",
"=",
"0",
";",
"ZKUtil",
".",
"fireEvent",
"(",
"new",
"AsyncRPCCompleteEvent",
"(... | RPC completion callback. | [
"RPC",
"completion",
"callback",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java#L89-L96 |
151,458 | carewebframework/carewebframework-vista | org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java | AsyncRPCEventDispatcher.onRPCError | @Override
public void onRPCError(int handle, int code, String text) {
if (handle == asyncHandle) {
asyncHandle = 0;
ZKUtil.fireEvent(new AsyncRPCErrorEvent(rpcName, target, code, text, handle));
rpcName = null;
}
} | java | @Override
public void onRPCError(int handle, int code, String text) {
if (handle == asyncHandle) {
asyncHandle = 0;
ZKUtil.fireEvent(new AsyncRPCErrorEvent(rpcName, target, code, text, handle));
rpcName = null;
}
} | [
"@",
"Override",
"public",
"void",
"onRPCError",
"(",
"int",
"handle",
",",
"int",
"code",
",",
"String",
"text",
")",
"{",
"if",
"(",
"handle",
"==",
"asyncHandle",
")",
"{",
"asyncHandle",
"=",
"0",
";",
"ZKUtil",
".",
"fireEvent",
"(",
"new",
"Async... | RPC error callback. | [
"RPC",
"error",
"callback",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.ui-parent/org.carewebframework.vista.ui.core/src/main/java/org/carewebframework/vista/ui/mbroker/AsyncRPCEventDispatcher.java#L101-L108 |
151,459 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/grid/GridList.java | GridList.findElement | public int findElement(Object bookmark, int iHandleType)
{
int iTargetPosition;
Object thisBookmark = null;
if (bookmark == null)
return -1;
//+ Not found, look through the recordlist
boolean bDataRecordFormat = false;
for (iTargetPosition = 0; iTargetPosition < m... | java | public int findElement(Object bookmark, int iHandleType)
{
int iTargetPosition;
Object thisBookmark = null;
if (bookmark == null)
return -1;
//+ Not found, look through the recordlist
boolean bDataRecordFormat = false;
for (iTargetPosition = 0; iTargetPosition < m... | [
"public",
"int",
"findElement",
"(",
"Object",
"bookmark",
",",
"int",
"iHandleType",
")",
"{",
"int",
"iTargetPosition",
";",
"Object",
"thisBookmark",
"=",
"null",
";",
"if",
"(",
"bookmark",
"==",
"null",
")",
"return",
"-",
"1",
";",
"//+ Not found, look... | Search through this list for this bookmark.
@return int index in table; or -1 if not found.
@param bookmark java.lang.Object The bookmark to search for.
@param iHandleType The type of bookmark passed. | [
"Search",
"through",
"this",
"list",
"for",
"this",
"bookmark",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/grid/GridList.java#L92-L114 |
151,460 | jbundle/jbundle | base/base/src/main/java/org/jbundle/base/db/grid/GridList.java | GridList.growAccessList | public void growAccessList(int iTargetPosition)
{
int iArrayIndex;
if (m_aRecords == null)
{
m_aRecords = new Object[MAX_RECORD_ARRAY_SIZE];
m_iRecordListStep = 1;
m_iRecordListMax = MAX_RECORD_ARRAY_SIZE; // Last + 1
}
else
{
... | java | public void growAccessList(int iTargetPosition)
{
int iArrayIndex;
if (m_aRecords == null)
{
m_aRecords = new Object[MAX_RECORD_ARRAY_SIZE];
m_iRecordListStep = 1;
m_iRecordListMax = MAX_RECORD_ARRAY_SIZE; // Last + 1
}
else
{
... | [
"public",
"void",
"growAccessList",
"(",
"int",
"iTargetPosition",
")",
"{",
"int",
"iArrayIndex",
";",
"if",
"(",
"m_aRecords",
"==",
"null",
")",
"{",
"m_aRecords",
"=",
"new",
"Object",
"[",
"MAX_RECORD_ARRAY_SIZE",
"]",
";",
"m_iRecordListStep",
"=",
"1",
... | Increase the granularity of the access list.
@param iTargetPosition The virtual size of the list has to include this target position. | [
"Increase",
"the",
"granularity",
"of",
"the",
"access",
"list",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/grid/GridList.java#L137-L169 |
151,461 | thorinii/lct | src/main/java/me/lachlanap/lct/data/ClassInspector.java | ClassInspector.getConstants | public List<ConstantField> getConstants(Class<?> aClass) {
List<ConstantField> constants = new ArrayList<>();
List<Field> fields = Arrays.asList(aClass.getDeclaredFields());
for (Field field : fields) {
if (Modifier.isStatic(field.getModifiers()) && !Modifier.isFinal(field.getModifi... | java | public List<ConstantField> getConstants(Class<?> aClass) {
List<ConstantField> constants = new ArrayList<>();
List<Field> fields = Arrays.asList(aClass.getDeclaredFields());
for (Field field : fields) {
if (Modifier.isStatic(field.getModifiers()) && !Modifier.isFinal(field.getModifi... | [
"public",
"List",
"<",
"ConstantField",
">",
"getConstants",
"(",
"Class",
"<",
"?",
">",
"aClass",
")",
"{",
"List",
"<",
"ConstantField",
">",
"constants",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"List",
"<",
"Field",
">",
"fields",
"=",
"Array... | Gets all fields that are potential 'constants'.
@param aClass the class to work from
@return all constants that could be found | [
"Gets",
"all",
"fields",
"that",
"are",
"potential",
"constants",
"."
] | 83d9dd94aac1efec4815b5658faa395a081592dc | https://github.com/thorinii/lct/blob/83d9dd94aac1efec4815b5658faa395a081592dc/src/main/java/me/lachlanap/lct/data/ClassInspector.java#L37-L59 |
151,462 | incodehq-legacy/incode-module-base | dom/src/main/java/org/incode/module/base/dom/valuetypes/LocalDateInterval.java | LocalDateInterval.parseString | public static LocalDateInterval parseString(final String input) {
String[] values = input.split("/");
try {
return new LocalDateInterval(parseLocalDate(values[0]), parseLocalDate(values[1]), IntervalEnding.EXCLUDING_END_DATE);
} catch (Exception e) {
throw new IllegalArgu... | java | public static LocalDateInterval parseString(final String input) {
String[] values = input.split("/");
try {
return new LocalDateInterval(parseLocalDate(values[0]), parseLocalDate(values[1]), IntervalEnding.EXCLUDING_END_DATE);
} catch (Exception e) {
throw new IllegalArgu... | [
"public",
"static",
"LocalDateInterval",
"parseString",
"(",
"final",
"String",
"input",
")",
"{",
"String",
"[",
"]",
"values",
"=",
"input",
".",
"split",
"(",
"\"/\"",
")",
";",
"try",
"{",
"return",
"new",
"LocalDateInterval",
"(",
"parseLocalDate",
"(",... | Parse a string representation of a LocalDateInterval
Since this method is only used for testing it's not heavily guarded against illegal arguments
@param input a string with format yyyy-mm-dd/yyyy-mm-dd, end date is excluding
@return | [
"Parse",
"a",
"string",
"representation",
"of",
"a",
"LocalDateInterval"
] | 8dfbf946c26423adf6d3e751698968b035c4ef11 | https://github.com/incodehq-legacy/incode-module-base/blob/8dfbf946c26423adf6d3e751698968b035c4ef11/dom/src/main/java/org/incode/module/base/dom/valuetypes/LocalDateInterval.java#L114-L121 |
151,463 | incodehq-legacy/incode-module-base | dom/src/main/java/org/incode/module/base/dom/valuetypes/LocalDateInterval.java | LocalDateInterval.parseLocalDate | private static LocalDate parseLocalDate(final String input) {
if (input.contains("--") || input.contains("*")) {
return null;
}
return LocalDate.parse(input);
} | java | private static LocalDate parseLocalDate(final String input) {
if (input.contains("--") || input.contains("*")) {
return null;
}
return LocalDate.parse(input);
} | [
"private",
"static",
"LocalDate",
"parseLocalDate",
"(",
"final",
"String",
"input",
")",
"{",
"if",
"(",
"input",
".",
"contains",
"(",
"\"--\"",
")",
"||",
"input",
".",
"contains",
"(",
"\"*\"",
")",
")",
"{",
"return",
"null",
";",
"}",
"return",
"... | Parse a string to a LocalDate
@param input a string representing a parsable LocalDate, "*" or "----------" returns null
@return | [
"Parse",
"a",
"string",
"to",
"a",
"LocalDate"
] | 8dfbf946c26423adf6d3e751698968b035c4ef11 | https://github.com/incodehq-legacy/incode-module-base/blob/8dfbf946c26423adf6d3e751698968b035c4ef11/dom/src/main/java/org/incode/module/base/dom/valuetypes/LocalDateInterval.java#L129-L134 |
151,464 | etnetera/seb | src/main/java/cz/etnetera/seb/listener/SebListener.java | SebListener.disable | @SuppressWarnings("unchecked")
public SebListener disable(Class<? extends SebEvent>... events) {
if (events != null) {
enabledEvents = null;
if (disabledEvents == null)
disabledEvents = new HashSet<>();
for (Class<? extends SebEvent> event : events) {
disabledEvents.add(event);
}
}
return thi... | java | @SuppressWarnings("unchecked")
public SebListener disable(Class<? extends SebEvent>... events) {
if (events != null) {
enabledEvents = null;
if (disabledEvents == null)
disabledEvents = new HashSet<>();
for (Class<? extends SebEvent> event : events) {
disabledEvents.add(event);
}
}
return thi... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"SebListener",
"disable",
"(",
"Class",
"<",
"?",
"extends",
"SebEvent",
">",
"...",
"events",
")",
"{",
"if",
"(",
"events",
"!=",
"null",
")",
"{",
"enabledEvents",
"=",
"null",
";",
"if",
"... | Disables specific events only. It overrides all enabled events.
@param events
Events to enable
@return This instance | [
"Disables",
"specific",
"events",
"only",
".",
"It",
"overrides",
"all",
"enabled",
"events",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/listener/SebListener.java#L120-L131 |
151,465 | etnetera/seb | src/main/java/cz/etnetera/seb/listener/SebListener.java | SebListener.saveFile | protected void saveFile(SebEvent event, String content, String name, String extension) {
event.saveFile(content, getListenerFileName(name), extension);
} | java | protected void saveFile(SebEvent event, String content, String name, String extension) {
event.saveFile(content, getListenerFileName(name), extension);
} | [
"protected",
"void",
"saveFile",
"(",
"SebEvent",
"event",
",",
"String",
"content",
",",
"String",
"name",
",",
"String",
"extension",
")",
"{",
"event",
".",
"saveFile",
"(",
"content",
",",
"getListenerFileName",
"(",
"name",
")",
",",
"extension",
")",
... | Save string content into output file with given name and extension.
@param event
@param content
@param name
@param extension | [
"Save",
"string",
"content",
"into",
"output",
"file",
"with",
"given",
"name",
"and",
"extension",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/listener/SebListener.java#L437-L439 |
151,466 | etnetera/seb | src/main/java/cz/etnetera/seb/listener/SebListener.java | SebListener.saveFile | protected void saveFile(SebEvent event, byte[] bytes, String name, String extension) {
event.saveFile(bytes, getListenerFileName(name), extension);
} | java | protected void saveFile(SebEvent event, byte[] bytes, String name, String extension) {
event.saveFile(bytes, getListenerFileName(name), extension);
} | [
"protected",
"void",
"saveFile",
"(",
"SebEvent",
"event",
",",
"byte",
"[",
"]",
"bytes",
",",
"String",
"name",
",",
"String",
"extension",
")",
"{",
"event",
".",
"saveFile",
"(",
"bytes",
",",
"getListenerFileName",
"(",
"name",
")",
",",
"extension",
... | Save bytes into output file with given name and extension.
@param event
@param bytes
@param name
@param extension | [
"Save",
"bytes",
"into",
"output",
"file",
"with",
"given",
"name",
"and",
"extension",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/listener/SebListener.java#L449-L451 |
151,467 | etnetera/seb | src/main/java/cz/etnetera/seb/listener/SebListener.java | SebListener.saveFile | protected void saveFile(SebEvent event, File file, String name, String extension) {
event.saveFile(file, getListenerFileName(name), extension);
} | java | protected void saveFile(SebEvent event, File file, String name, String extension) {
event.saveFile(file, getListenerFileName(name), extension);
} | [
"protected",
"void",
"saveFile",
"(",
"SebEvent",
"event",
",",
"File",
"file",
",",
"String",
"name",
",",
"String",
"extension",
")",
"{",
"event",
".",
"saveFile",
"(",
"file",
",",
"getListenerFileName",
"(",
"name",
")",
",",
"extension",
")",
";",
... | Save file into output file with given name and extension.
@param event
@param file
@param name
@param extension | [
"Save",
"file",
"into",
"output",
"file",
"with",
"given",
"name",
"and",
"extension",
"."
] | 6aed29c7726db12f440c60cfd253de229064ed04 | https://github.com/etnetera/seb/blob/6aed29c7726db12f440c60cfd253de229064ed04/src/main/java/cz/etnetera/seb/listener/SebListener.java#L461-L463 |
151,468 | jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java | JAltGridScreen.setupPanel | public void setupPanel()
{
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.addGridHeading();
JPanel panel = new JPanel();
panel.setOpaque(false);
panel.setMinimumSize(new Dimension(20, 20));
panel.setLayout(new BorderLayout());
JScrollPane scrollP... | java | public void setupPanel()
{
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.addGridHeading();
JPanel panel = new JPanel();
panel.setOpaque(false);
panel.setMinimumSize(new Dimension(20, 20));
panel.setLayout(new BorderLayout());
JScrollPane scrollP... | [
"public",
"void",
"setupPanel",
"(",
")",
"{",
"this",
".",
"setLayout",
"(",
"new",
"BoxLayout",
"(",
"this",
",",
"BoxLayout",
".",
"Y_AXIS",
")",
")",
";",
"this",
".",
"addGridHeading",
"(",
")",
";",
"JPanel",
"panel",
"=",
"new",
"JPanel",
"(",
... | Setup a new panel. | [
"Setup",
"a",
"new",
"panel",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L122-L145 |
151,469 | jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java | JAltGridScreen.addGridDetailItem | public void addGridDetailItem(TableModel model, int iRowIndex, GridBagLayout gridbag, GridBagConstraints c)
{
JComponent rgcompoments[] = new JComponent[model.getColumnCount()];
for (int iColumnIndex = 0; iColumnIndex < rgcompoments.length; iColumnIndex++)
{
Object obj = model.ge... | java | public void addGridDetailItem(TableModel model, int iRowIndex, GridBagLayout gridbag, GridBagConstraints c)
{
JComponent rgcompoments[] = new JComponent[model.getColumnCount()];
for (int iColumnIndex = 0; iColumnIndex < rgcompoments.length; iColumnIndex++)
{
Object obj = model.ge... | [
"public",
"void",
"addGridDetailItem",
"(",
"TableModel",
"model",
",",
"int",
"iRowIndex",
",",
"GridBagLayout",
"gridbag",
",",
"GridBagConstraints",
"c",
")",
"{",
"JComponent",
"rgcompoments",
"[",
"]",
"=",
"new",
"JComponent",
"[",
"model",
".",
"getColumn... | Add this item to the grid detail at this row.
@param model The table model to read through.
@param iRowIndex The row to add this item.
@param gridbag The screen layout.
@param c The constraint to use. | [
"Add",
"this",
"item",
"to",
"the",
"grid",
"detail",
"at",
"this",
"row",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L223-L247 |
151,470 | jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java | JAltGridScreen.addDetailComponent | public Component addDetailComponent(TableModel model, Object aValue, int iRowIndex, int iColumnIndex, GridBagConstraints c)
{
JComponent component = null;
String string = "";
if (aValue instanceof ImageIcon)
{
component = new JLabel((ImageIcon)aValue);
}
i... | java | public Component addDetailComponent(TableModel model, Object aValue, int iRowIndex, int iColumnIndex, GridBagConstraints c)
{
JComponent component = null;
String string = "";
if (aValue instanceof ImageIcon)
{
component = new JLabel((ImageIcon)aValue);
}
i... | [
"public",
"Component",
"addDetailComponent",
"(",
"TableModel",
"model",
",",
"Object",
"aValue",
",",
"int",
"iRowIndex",
",",
"int",
"iColumnIndex",
",",
"GridBagConstraints",
"c",
")",
"{",
"JComponent",
"component",
"=",
"null",
";",
"String",
"string",
"=",... | Create the appropriate component and add it to the grid detail at this location.
@param model The table model to read through.
@param iRowIndex The row to add this item.
@param iColumnIndex The column index of this component.
@param c The constraint to use. | [
"Create",
"the",
"appropriate",
"component",
"and",
"add",
"it",
"to",
"the",
"grid",
"detail",
"at",
"this",
"location",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L255-L281 |
151,471 | jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java | JAltGridScreen.dataToField | public void dataToField(ComponentCache componentCache, int iRowIndex, int iColumnIndex)
{
if (componentCache.m_rgcompoments[iColumnIndex] != null)
{
String string = null;
if (componentCache.m_rgcompoments[iColumnIndex] instanceof JTextComponent)
string = ((JTe... | java | public void dataToField(ComponentCache componentCache, int iRowIndex, int iColumnIndex)
{
if (componentCache.m_rgcompoments[iColumnIndex] != null)
{
String string = null;
if (componentCache.m_rgcompoments[iColumnIndex] instanceof JTextComponent)
string = ((JTe... | [
"public",
"void",
"dataToField",
"(",
"ComponentCache",
"componentCache",
",",
"int",
"iRowIndex",
",",
"int",
"iColumnIndex",
")",
"{",
"if",
"(",
"componentCache",
".",
"m_rgcompoments",
"[",
"iColumnIndex",
"]",
"!=",
"null",
")",
"{",
"String",
"string",
"... | Change the table by setting this field to the value in the component at this location.
@param componentCache The cached components on this row.
@param iRowIndex The row to set.
@param ColumnIndex The column to set. | [
"Change",
"the",
"table",
"by",
"setting",
"this",
"field",
"to",
"the",
"value",
"in",
"the",
"component",
"at",
"this",
"location",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L330-L343 |
151,472 | jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java | JAltGridScreen.fieldToData | public void fieldToData(ComponentCache componentCache, int iRowIndex, int iColumnIndex)
{
if (componentCache.m_rgcompoments[iColumnIndex] != null)
{
Object object = this.getModel().getValueAt(iRowIndex, iColumnIndex);
String string = "";
if (object != null)
... | java | public void fieldToData(ComponentCache componentCache, int iRowIndex, int iColumnIndex)
{
if (componentCache.m_rgcompoments[iColumnIndex] != null)
{
Object object = this.getModel().getValueAt(iRowIndex, iColumnIndex);
String string = "";
if (object != null)
... | [
"public",
"void",
"fieldToData",
"(",
"ComponentCache",
"componentCache",
",",
"int",
"iRowIndex",
",",
"int",
"iColumnIndex",
")",
"{",
"if",
"(",
"componentCache",
".",
"m_rgcompoments",
"[",
"iColumnIndex",
"]",
"!=",
"null",
")",
"{",
"Object",
"object",
"... | Move the data in this row and column in the table to this component.
@param componentCache The cached components on this row.
@param iRowIndex The row to set.
@param ColumnIndex The column to set. | [
"Move",
"the",
"data",
"in",
"this",
"row",
"and",
"column",
"in",
"the",
"table",
"to",
"this",
"component",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L368-L386 |
151,473 | jbundle/jbundle | thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java | JAltGridScreen.tableChanged | public void tableChanged(TableModelEvent e)
{
if ((e.getFirstRow() == TableModelEvent.HEADER_ROW) ||
(e.getLastRow() >= m_vComponentCache.size()))
{ // Entire table changed, rebuild table
this.removeAll();
this.setupPanel();
this.validate();
... | java | public void tableChanged(TableModelEvent e)
{
if ((e.getFirstRow() == TableModelEvent.HEADER_ROW) ||
(e.getLastRow() >= m_vComponentCache.size()))
{ // Entire table changed, rebuild table
this.removeAll();
this.setupPanel();
this.validate();
... | [
"public",
"void",
"tableChanged",
"(",
"TableModelEvent",
"e",
")",
"{",
"if",
"(",
"(",
"e",
".",
"getFirstRow",
"(",
")",
"==",
"TableModelEvent",
".",
"HEADER_ROW",
")",
"||",
"(",
"e",
".",
"getLastRow",
"(",
")",
">=",
"m_vComponentCache",
".",
"siz... | The table has changed, update the grid.
@param e The TableModelEvent. | [
"The",
"table",
"has",
"changed",
"update",
"the",
"grid",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/grid/src/main/java/org/jbundle/thin/base/screen/grid/opt/JAltGridScreen.java#L391-L421 |
151,474 | trellis-ldp-archive/trellis-io-jena | src/main/java/org/trellisldp/io/impl/HtmlSerializer.java | HtmlSerializer.write | public void write(final OutputStream out, final Stream<? extends Triple> triples, final IRI subject) {
final Writer writer = new OutputStreamWriter(out, UTF_8);
try {
template
.execute(writer, new HtmlData(namespaceService, subject, triples.collect(toList()), properties))
... | java | public void write(final OutputStream out, final Stream<? extends Triple> triples, final IRI subject) {
final Writer writer = new OutputStreamWriter(out, UTF_8);
try {
template
.execute(writer, new HtmlData(namespaceService, subject, triples.collect(toList()), properties))
... | [
"public",
"void",
"write",
"(",
"final",
"OutputStream",
"out",
",",
"final",
"Stream",
"<",
"?",
"extends",
"Triple",
">",
"triples",
",",
"final",
"IRI",
"subject",
")",
"{",
"final",
"Writer",
"writer",
"=",
"new",
"OutputStreamWriter",
"(",
"out",
",",... | Send the content to an output stream
@param out the output stream
@param triples the triples
@param subject the subject | [
"Send",
"the",
"content",
"to",
"an",
"output",
"stream"
] | 3a06f8f8e7b6fc83fb659cb61217810f813967e8 | https://github.com/trellis-ldp-archive/trellis-io-jena/blob/3a06f8f8e7b6fc83fb659cb61217810f813967e8/src/main/java/org/trellisldp/io/impl/HtmlSerializer.java#L80-L89 |
151,475 | carewebframework/carewebframework-vista | org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/BrokerHttpResponse.java | BrokerHttpResponse.parseContentType | private ContentType parseContentType(String value) {
String[] pcs = value.split("\\;");
String mimeType = pcs[0].trim();
String charSet = "UTF-8";
for (int i = 1; i < pcs.length; i++) {
String s = pcs[i].trim().toUpperCase();
if (s.startsWith... | java | private ContentType parseContentType(String value) {
String[] pcs = value.split("\\;");
String mimeType = pcs[0].trim();
String charSet = "UTF-8";
for (int i = 1; i < pcs.length; i++) {
String s = pcs[i].trim().toUpperCase();
if (s.startsWith... | [
"private",
"ContentType",
"parseContentType",
"(",
"String",
"value",
")",
"{",
"String",
"[",
"]",
"pcs",
"=",
"value",
".",
"split",
"(",
"\"\\\\;\"",
")",
";",
"String",
"mimeType",
"=",
"pcs",
"[",
"0",
"]",
".",
"trim",
"(",
")",
";",
"String",
... | Parse the returned content type.
@param value Value to parse
@return ContentType instance | [
"Parse",
"the",
"returned",
"content",
"type",
"."
] | 883b2cbe395d9e8a21cd19db820f0876bda6b1c6 | https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.mbroker/src/main/java/org/carewebframework/vista/mbroker/BrokerHttpResponse.java#L147-L162 |
151,476 | oglimmer/utils | src/main/java/de/oglimmer/utils/random/RandomString.java | RandomString.getRandomString | public static String getRandomString(final int size, final int start, final int length) {
final StringBuilder buff = new StringBuilder(size);
for (int i = 0; i < size; i++) {
buff.append((char) (RAN.nextInt(length) + start));
}
return buff.toString();
} | java | public static String getRandomString(final int size, final int start, final int length) {
final StringBuilder buff = new StringBuilder(size);
for (int i = 0; i < size; i++) {
buff.append((char) (RAN.nextInt(length) + start));
}
return buff.toString();
} | [
"public",
"static",
"String",
"getRandomString",
"(",
"final",
"int",
"size",
",",
"final",
"int",
"start",
",",
"final",
"int",
"length",
")",
"{",
"final",
"StringBuilder",
"buff",
"=",
"new",
"StringBuilder",
"(",
"size",
")",
";",
"for",
"(",
"int",
... | Creates a size byte long unicode string. All codes are >= start and < start+length
@param size number of characters in the return string
@param start start code
@param length all generated codes are within this range
@return | [
"Creates",
"a",
"size",
"byte",
"long",
"unicode",
"string",
".",
"All",
"codes",
"are",
">",
";",
"=",
"start",
"and",
"<",
";",
"start",
"+",
"length"
] | bc46c57a24e60c9dbda4c73a810c163b0ce407ea | https://github.com/oglimmer/utils/blob/bc46c57a24e60c9dbda4c73a810c163b0ce407ea/src/main/java/de/oglimmer/utils/random/RandomString.java#L26-L33 |
151,477 | oglimmer/utils | src/main/java/de/oglimmer/utils/random/RandomString.java | RandomString.getRandomString | public static String getRandomString(final int size, final String stringSet) {
final StringBuilder buff = new StringBuilder(size);
for (int i = 0; i < size; i++) {
final char nextChar = stringSet.charAt(RAN.nextInt(stringSet.length()));
buff.append(nextChar);
}
return buff.toString();
} | java | public static String getRandomString(final int size, final String stringSet) {
final StringBuilder buff = new StringBuilder(size);
for (int i = 0; i < size; i++) {
final char nextChar = stringSet.charAt(RAN.nextInt(stringSet.length()));
buff.append(nextChar);
}
return buff.toString();
} | [
"public",
"static",
"String",
"getRandomString",
"(",
"final",
"int",
"size",
",",
"final",
"String",
"stringSet",
")",
"{",
"final",
"StringBuilder",
"buff",
"=",
"new",
"StringBuilder",
"(",
"size",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",... | Creates a size byte long unicode string. All codes are from the set "stringSet"
@param size
number of characters in the return string
@param stringSet
set of characters used for string creation
@return a random string build from "stringSet" | [
"Creates",
"a",
"size",
"byte",
"long",
"unicode",
"string",
".",
"All",
"codes",
"are",
"from",
"the",
"set",
"stringSet"
] | bc46c57a24e60c9dbda4c73a810c163b0ce407ea | https://github.com/oglimmer/utils/blob/bc46c57a24e60c9dbda4c73a810c163b0ce407ea/src/main/java/de/oglimmer/utils/random/RandomString.java#L77-L86 |
151,478 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.addChild | public void addChild(Config child)
{
Params.notNull(child, "Child");
child.parent = this;
children.add(child);
} | java | public void addChild(Config child)
{
Params.notNull(child, "Child");
child.parent = this;
children.add(child);
} | [
"public",
"void",
"addChild",
"(",
"Config",
"child",
")",
"{",
"Params",
".",
"notNull",
"(",
"child",
",",
"\"Child\"",
")",
";",
"child",
".",
"parent",
"=",
"this",
";",
"children",
".",
"add",
"(",
"child",
")",
";",
"}"
] | Add child configuration object.
@param child child configuration object.
@throws IllegalArgumentException if <code>child</code> argument is null. | [
"Add",
"child",
"configuration",
"object",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L99-L104 |
151,479 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.setAttribute | public void setAttribute(String name, String value)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notEmpty(value, "Attribute value");
if(value != null) {
attributes.put(name, value);
}
else {
attributes.remove(name);
}
} | java | public void setAttribute(String name, String value)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notEmpty(value, "Attribute value");
if(value != null) {
attributes.put(name, value);
}
else {
attributes.remove(name);
}
} | [
"public",
"void",
"setAttribute",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Attribute name\"",
")",
";",
"Params",
".",
"notEmpty",
"(",
"value",
",",
"\"Attribute value\"",
")",
";",
"if",... | Set configuration object attribute. If attribute already exists overwrite old value. Empty value is not accepted
but null is considered indication to remove attribute. So that, an existing attribute cannot be either null or
empty.
@param name attribute name,
@param value attribute value, null ignored.
@throws IllegalA... | [
"Set",
"configuration",
"object",
"attribute",
".",
"If",
"attribute",
"already",
"exists",
"overwrite",
"old",
"value",
".",
"Empty",
"value",
"is",
"not",
"accepted",
"but",
"null",
"is",
"considered",
"indication",
"to",
"remove",
"attribute",
".",
"So",
"t... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L116-L126 |
151,480 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getRoot | public Config getRoot()
{
Config root = this;
while(root.parent != null) {
root = root.parent;
}
return root;
} | java | public Config getRoot()
{
Config root = this;
while(root.parent != null) {
root = root.parent;
}
return root;
} | [
"public",
"Config",
"getRoot",
"(",
")",
"{",
"Config",
"root",
"=",
"this",
";",
"while",
"(",
"root",
".",
"parent",
"!=",
"null",
")",
"{",
"root",
"=",
"root",
".",
"parent",
";",
"}",
"return",
"root",
";",
"}"
] | Get root of the tree this configuration object is part of.
@return configuration object root. | [
"Get",
"root",
"of",
"the",
"tree",
"this",
"configuration",
"object",
"is",
"part",
"of",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L201-L208 |
151,481 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.hasAttribute | public boolean hasAttribute(String name, String value)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notNullOrEmpty(value, "Attribute value");
return value.equals(attributes.get(name));
} | java | public boolean hasAttribute(String name, String value)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notNullOrEmpty(value, "Attribute value");
return value.equals(attributes.get(name));
} | [
"public",
"boolean",
"hasAttribute",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Attribute name\"",
")",
";",
"Params",
".",
"notNullOrEmpty",
"(",
"value",
",",
"\"Attribute value\"",
")",
";"... | Test if configuration object has an attribute with requested name and value.
@param name name of the attribute to search for,
@param value attribute value.
@return true if configuration object has an attribute with requested name and value.
@throws IllegalArgumentException if <code>name</code> argument is null or empt... | [
"Test",
"if",
"configuration",
"object",
"has",
"an",
"attribute",
"with",
"requested",
"name",
"and",
"value",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L252-L257 |
151,482 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getAttribute | public String getAttribute(String name)
{
Params.notNullOrEmpty(name, "Attribute name");
return attributes.get(name);
} | java | public String getAttribute(String name)
{
Params.notNullOrEmpty(name, "Attribute name");
return attributes.get(name);
} | [
"public",
"String",
"getAttribute",
"(",
"String",
"name",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Attribute name\"",
")",
";",
"return",
"attributes",
".",
"get",
"(",
"name",
")",
";",
"}"
] | Get attribute value or null if there is no attribute with requested name. An existing attribute value cannot ever
be empty or null so if this method returns null is for missing attribute.
@param name attribute name.
@return attribute value or null if named attribute not found.
@throws IllegalArgumentException if <code... | [
"Get",
"attribute",
"value",
"or",
"null",
"if",
"there",
"is",
"no",
"attribute",
"with",
"requested",
"name",
".",
"An",
"existing",
"attribute",
"value",
"cannot",
"ever",
"be",
"empty",
"or",
"null",
"so",
"if",
"this",
"method",
"returns",
"null",
"is... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L267-L271 |
151,483 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getAttribute | public String getAttribute(String name, String defaultValue)
{
Params.notNullOrEmpty(name, "Attribute name");
return getAttribute(name, String.class, defaultValue);
} | java | public String getAttribute(String name, String defaultValue)
{
Params.notNullOrEmpty(name, "Attribute name");
return getAttribute(name, String.class, defaultValue);
} | [
"public",
"String",
"getAttribute",
"(",
"String",
"name",
",",
"String",
"defaultValue",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Attribute name\"",
")",
";",
"return",
"getAttribute",
"(",
"name",
",",
"String",
".",
"class",
",",
"d... | Get attribute value or given default value if there is no attribute with requested name. If given default value is
null and attribute is not found this method still returns null, that is, requested default value.
@param name attribute name.
@param defaultValue default value, null or empty accepted.
@return attribute v... | [
"Get",
"attribute",
"value",
"or",
"given",
"default",
"value",
"if",
"there",
"is",
"no",
"attribute",
"with",
"requested",
"name",
".",
"If",
"given",
"default",
"value",
"is",
"null",
"and",
"attribute",
"is",
"not",
"found",
"this",
"method",
"still",
... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L282-L286 |
151,484 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getAttribute | public <T> T getAttribute(String name, Class<T> type)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notNull(type, "Attribute type");
return getAttribute(name, type, null);
} | java | public <T> T getAttribute(String name, Class<T> type)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notNull(type, "Attribute type");
return getAttribute(name, type, null);
} | [
"public",
"<",
"T",
">",
"T",
"getAttribute",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Attribute name\"",
")",
";",
"Params",
".",
"notNull",
"(",
"type",
",",
"\"Attrib... | Get attribute value converted to requested type or null if there is no attribute with requested name.
@param name attribute name,
@param type type to converter attribute value to.
@param <T> type to convert attribute value.
@return newly created value object or null if named attribute not found.
@throws IllegalArgumen... | [
"Get",
"attribute",
"value",
"converted",
"to",
"requested",
"type",
"or",
"null",
"if",
"there",
"is",
"no",
"attribute",
"with",
"requested",
"name",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L299-L304 |
151,485 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getAttribute | public <T> T getAttribute(String name, Class<T> type, T defaultValue)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notNull(type, "Attribute type");
String value = attributes.get(name);
return value != null ? converter.asObject(value, type) : defaultValue;
} | java | public <T> T getAttribute(String name, Class<T> type, T defaultValue)
{
Params.notNullOrEmpty(name, "Attribute name");
Params.notNull(type, "Attribute type");
String value = attributes.get(name);
return value != null ? converter.asObject(value, type) : defaultValue;
} | [
"public",
"<",
"T",
">",
"T",
"getAttribute",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"type",
",",
"T",
"defaultValue",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Attribute name\"",
")",
";",
"Params",
".",
"notNull",
"... | Get attribute value converted to requested type or default value if there is no attribute with requested name. If
given default value is null and attribute is not found this method still returns null, that is, the requested
default value.
@param name attribute name,
@param type type to converter attribute value to,
@p... | [
"Get",
"attribute",
"value",
"converted",
"to",
"requested",
"type",
"or",
"default",
"value",
"if",
"there",
"is",
"no",
"attribute",
"with",
"requested",
"name",
".",
"If",
"given",
"default",
"value",
"is",
"null",
"and",
"attribute",
"is",
"not",
"found"... | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L320-L326 |
151,486 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getProperty | public String getProperty(String name)
{
Params.notNullOrEmpty(name, "Property name");
usedProperties.add(name);
return properties.getProperty(name);
} | java | public String getProperty(String name)
{
Params.notNullOrEmpty(name, "Property name");
usedProperties.add(name);
return properties.getProperty(name);
} | [
"public",
"String",
"getProperty",
"(",
"String",
"name",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Property name\"",
")",
";",
"usedProperties",
".",
"add",
"(",
"name",
")",
";",
"return",
"properties",
".",
"getProperty",
"(",
"name"... | Get configuration object property value or null if there is no property with requested name.
@param name property name.
@return configuration object property value or null.
@throws IllegalArgumentException if <code>name</code> argument is null or empty. | [
"Get",
"configuration",
"object",
"property",
"value",
"or",
"null",
"if",
"there",
"is",
"no",
"property",
"with",
"requested",
"name",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L377-L382 |
151,487 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getProperty | public <T> T getProperty(String name, Class<T> type)
{
return getProperty(name, type, null);
} | java | public <T> T getProperty(String name, Class<T> type)
{
return getProperty(name, type, null);
} | [
"public",
"<",
"T",
">",
"T",
"getProperty",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"return",
"getProperty",
"(",
"name",
",",
"type",
",",
"null",
")",
";",
"}"
] | Get configuration object property converter to requested type or null if there is no property with given name.
@param name property name.
@param type type to convert property value to.
@param <T> value type.
@return newly created value object or null.
@throws IllegalArgumentException if <code>name</code> argument is n... | [
"Get",
"configuration",
"object",
"property",
"converter",
"to",
"requested",
"type",
"or",
"null",
"if",
"there",
"is",
"no",
"property",
"with",
"given",
"name",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L409-L412 |
151,488 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getProperty | public <T> T getProperty(String name, Class<T> type, T defaultValue)
{
Params.notNullOrEmpty(name, "Property name");
Params.notNull(type, "Property type");
String value = getProperty(name);
if(value != null) {
return converter.asObject(value, type);
}
return defaultValue;
} | java | public <T> T getProperty(String name, Class<T> type, T defaultValue)
{
Params.notNullOrEmpty(name, "Property name");
Params.notNull(type, "Property type");
String value = getProperty(name);
if(value != null) {
return converter.asObject(value, type);
}
return defaultValue;
} | [
"public",
"<",
"T",
">",
"T",
"getProperty",
"(",
"String",
"name",
",",
"Class",
"<",
"T",
">",
"type",
",",
"T",
"defaultValue",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Property name\"",
")",
";",
"Params",
".",
"notNull",
"("... | Get configuration object property converter to requested type or default value if there is no property with given
name.
@param name property name.
@param type type to convert property value to,
@param defaultValue default value, possible null or empty.
@param <T> value type.
@return newly created value object or defau... | [
"Get",
"configuration",
"object",
"property",
"converter",
"to",
"requested",
"type",
"or",
"default",
"value",
"if",
"there",
"is",
"no",
"property",
"with",
"given",
"name",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L427-L436 |
151,489 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.hasChild | public boolean hasChild(String name)
{
Params.notNullOrEmpty(name, "Child name");
for(Config child : children) {
if(child.name.equals(name)) {
return true;
}
}
return false;
} | java | public boolean hasChild(String name)
{
Params.notNullOrEmpty(name, "Child name");
for(Config child : children) {
if(child.name.equals(name)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasChild",
"(",
"String",
"name",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Child name\"",
")",
";",
"for",
"(",
"Config",
"child",
":",
"children",
")",
"{",
"if",
"(",
"child",
".",
"name",
".",
"equals",
"... | Test if configuration object has at least a child with requested name.
@param name child name.
@return true if configuration object has at least one child with requested name.
@throws IllegalArgumentException if <code>name</code> argument is null or empty. | [
"Test",
"if",
"configuration",
"object",
"has",
"at",
"least",
"a",
"child",
"with",
"requested",
"name",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L475-L484 |
151,490 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getChild | public Config getChild(String name)
{
Params.notNullOrEmpty(name, "Child name");
for(Config child : children) {
if(child.name.equals(name)) {
return child;
}
}
return null;
} | java | public Config getChild(String name)
{
Params.notNullOrEmpty(name, "Child name");
for(Config child : children) {
if(child.name.equals(name)) {
return child;
}
}
return null;
} | [
"public",
"Config",
"getChild",
"(",
"String",
"name",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Child name\"",
")",
";",
"for",
"(",
"Config",
"child",
":",
"children",
")",
"{",
"if",
"(",
"child",
".",
"name",
".",
"equals",
"(... | Get configuration object first child with requested name or null if there is no child with given name.
@param name child name.
@return configuration object child or null.
@throws IllegalArgumentException if <code>name</code> argument is null or empty. | [
"Get",
"configuration",
"object",
"first",
"child",
"with",
"requested",
"name",
"or",
"null",
"if",
"there",
"is",
"no",
"child",
"with",
"given",
"name",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L493-L502 |
151,491 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getChild | public Config getChild(int index)
{
Params.range(index, 0, children.size(), "Index");
return children.get(index);
} | java | public Config getChild(int index)
{
Params.range(index, 0, children.size(), "Index");
return children.get(index);
} | [
"public",
"Config",
"getChild",
"(",
"int",
"index",
")",
"{",
"Params",
".",
"range",
"(",
"index",
",",
"0",
",",
"children",
".",
"size",
"(",
")",
",",
"\"Index\"",
")",
";",
"return",
"children",
".",
"get",
"(",
"index",
")",
";",
"}"
] | Get configuration object child by index. Given index should be in range so that invoking this method on empty
children list will throw exception.
@param index child index.
@return configuration object child at requested index.
@throws IllegalArgumentException if <code>index</code> argument is not in range. | [
"Get",
"configuration",
"object",
"child",
"by",
"index",
".",
"Given",
"index",
"should",
"be",
"in",
"range",
"so",
"that",
"invoking",
"this",
"method",
"on",
"empty",
"children",
"list",
"will",
"throw",
"exception",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L512-L516 |
151,492 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.findChildren | public List<Config> findChildren(String... name)
{
Params.notNullOrEmpty(name, "Children names");
List<String> names = Arrays.asList(name);
List<Config> results = new ArrayList<Config>();
for(Config child : children) {
if(names.contains(child.name)) {
results.add(child);
}
... | java | public List<Config> findChildren(String... name)
{
Params.notNullOrEmpty(name, "Children names");
List<String> names = Arrays.asList(name);
List<Config> results = new ArrayList<Config>();
for(Config child : children) {
if(names.contains(child.name)) {
results.add(child);
}
... | [
"public",
"List",
"<",
"Config",
">",
"findChildren",
"(",
"String",
"...",
"name",
")",
"{",
"Params",
".",
"notNullOrEmpty",
"(",
"name",
",",
"\"Children names\"",
")",
";",
"List",
"<",
"String",
">",
"names",
"=",
"Arrays",
".",
"asList",
"(",
"name... | Find configuration object children with requested names.
@param name one or more child names.
@return configuration object children with requested names, possible empty.
@throws IllegalArgumentException if <code>name</code> list does not contains at least one item. | [
"Find",
"configuration",
"object",
"children",
"with",
"requested",
"names",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L525-L536 |
151,493 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getValue | public <T> T getValue(Class<T> type)
{
Params.notNull(type, "Value type");
if(value == null) {
return null;
}
return converter.asObject(value, type);
} | java | public <T> T getValue(Class<T> type)
{
Params.notNull(type, "Value type");
if(value == null) {
return null;
}
return converter.asObject(value, type);
} | [
"public",
"<",
"T",
">",
"T",
"getValue",
"(",
"Class",
"<",
"T",
">",
"type",
")",
"{",
"Params",
".",
"notNull",
"(",
"type",
",",
"\"Value type\"",
")",
";",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"return",
"co... | Get this configuration object value converted to requested type. Returns null if this configuration object has no
value.
@param type desired value object type.
@param <T> value type.
@return newly created value object or null.
@throws IllegalArgumentException if <code>type</code> argument is null.
@throws ConverterExc... | [
"Get",
"this",
"configuration",
"object",
"value",
"converted",
"to",
"requested",
"type",
".",
"Returns",
"null",
"if",
"this",
"configuration",
"object",
"has",
"no",
"value",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L559-L566 |
151,494 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.getChildValue | public String getChildValue(String name)
{
Config child = getChild(name);
return child != null ? child.getValue() : null;
} | java | public String getChildValue(String name)
{
Config child = getChild(name);
return child != null ? child.getValue() : null;
} | [
"public",
"String",
"getChildValue",
"(",
"String",
"name",
")",
"{",
"Config",
"child",
"=",
"getChild",
"(",
"name",
")",
";",
"return",
"child",
"!=",
"null",
"?",
"child",
".",
"getValue",
"(",
")",
":",
"null",
";",
"}"
] | Get named child string value or null if child not found or it has no value.
@param name name of the child to retrieve value from.
@return named child string value, possible null. | [
"Get",
"named",
"child",
"string",
"value",
"or",
"null",
"if",
"child",
"not",
"found",
"or",
"it",
"has",
"no",
"value",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L574-L578 |
151,495 | js-lib-com/commons | src/main/java/js/lang/Config.java | Config.print | private void print(Config config, int indent)
{
for(int i = 0; i < indent; ++i) {
System.out.print("\t");
}
System.out.print(config.name);
System.out.print("\r\n");
for(Config child : config.children) {
print(child, indent + 1);
}
} | java | private void print(Config config, int indent)
{
for(int i = 0; i < indent; ++i) {
System.out.print("\t");
}
System.out.print(config.name);
System.out.print("\r\n");
for(Config child : config.children) {
print(child, indent + 1);
}
} | [
"private",
"void",
"print",
"(",
"Config",
"config",
",",
"int",
"indent",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"indent",
";",
"++",
"i",
")",
"{",
"System",
".",
"out",
".",
"print",
"(",
"\"\\t\"",
")",
";",
"}",
"System... | Recursively print configuration object tree to standard out.
@param config configuration object,
@param indent indentation index. | [
"Recursively",
"print",
"configuration",
"object",
"tree",
"to",
"standard",
"out",
"."
] | f8c64482142b163487745da74feb106f0765c16b | https://github.com/js-lib-com/commons/blob/f8c64482142b163487745da74feb106f0765c16b/src/main/java/js/lang/Config.java#L592-L603 |
151,496 | jbundle/jbundle | thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java | CachedItem.setEndDate | public synchronized Date setEndDate(Date time)
{
m_cachedInfo.setEndDate(time);
int iThisIndex = m_model.indexOf(this);
if (iThisIndex != -1)
m_model.fireTableRowsUpdated(iThisIndex, iThisIndex);
this.changeRemoteDate(null, null, this, null, time);
return this.get... | java | public synchronized Date setEndDate(Date time)
{
m_cachedInfo.setEndDate(time);
int iThisIndex = m_model.indexOf(this);
if (iThisIndex != -1)
m_model.fireTableRowsUpdated(iThisIndex, iThisIndex);
this.changeRemoteDate(null, null, this, null, time);
return this.get... | [
"public",
"synchronized",
"Date",
"setEndDate",
"(",
"Date",
"time",
")",
"{",
"m_cachedInfo",
".",
"setEndDate",
"(",
"time",
")",
";",
"int",
"iThisIndex",
"=",
"m_model",
".",
"indexOf",
"(",
"this",
")",
";",
"if",
"(",
"iThisIndex",
"!=",
"-",
"1",
... | Change the ending time of this service.
First, move the item on the screen, then call the method to change the remote data. | [
"Change",
"the",
"ending",
"time",
"of",
"this",
"service",
".",
"First",
"move",
"the",
"item",
"on",
"the",
"screen",
"then",
"call",
"the",
"method",
"to",
"change",
"the",
"remote",
"data",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java#L133-L141 |
151,497 | jbundle/jbundle | thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java | CachedItem.getMealCache | public String[] getMealCache(Date dateStart, Date dateEnd) throws Exception
{
int iDays = (int)((dateEnd.getTime() - dateStart.getTime()) / Constants.KMS_IN_A_DAY) + 2;
if (iDays <= 0)
return null;
String[] rgstrMeals = new String[iDays];
Date date = new Date(dateStart.ge... | java | public String[] getMealCache(Date dateStart, Date dateEnd) throws Exception
{
int iDays = (int)((dateEnd.getTime() - dateStart.getTime()) / Constants.KMS_IN_A_DAY) + 2;
if (iDays <= 0)
return null;
String[] rgstrMeals = new String[iDays];
Date date = new Date(dateStart.ge... | [
"public",
"String",
"[",
"]",
"getMealCache",
"(",
"Date",
"dateStart",
",",
"Date",
"dateEnd",
")",
"throws",
"Exception",
"{",
"int",
"iDays",
"=",
"(",
"int",
")",
"(",
"(",
"dateEnd",
".",
"getTime",
"(",
")",
"-",
"dateStart",
".",
"getTime",
"(",... | Get the meals on each day of this product and put them in an array. | [
"Get",
"the",
"meals",
"on",
"each",
"day",
"of",
"this",
"product",
"and",
"put",
"them",
"in",
"an",
"array",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java#L195-L208 |
151,498 | jbundle/jbundle | thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java | CachedItem.setStatus | public synchronized int setStatus(int iStatus)
{
m_cachedInfo.setStatus(iStatus);
int iThisIndex = m_model.indexOf(this);
if (iThisIndex != -1)
m_model.fireTableRowsUpdated(iThisIndex, iThisIndex);
return this.getStatus();
} | java | public synchronized int setStatus(int iStatus)
{
m_cachedInfo.setStatus(iStatus);
int iThisIndex = m_model.indexOf(this);
if (iThisIndex != -1)
m_model.fireTableRowsUpdated(iThisIndex, iThisIndex);
return this.getStatus();
} | [
"public",
"synchronized",
"int",
"setStatus",
"(",
"int",
"iStatus",
")",
"{",
"m_cachedInfo",
".",
"setStatus",
"(",
"iStatus",
")",
";",
"int",
"iThisIndex",
"=",
"m_model",
".",
"indexOf",
"(",
"this",
")",
";",
"if",
"(",
"iThisIndex",
"!=",
"-",
"1"... | Set the status of this item. | [
"Set",
"the",
"status",
"of",
"this",
"item",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/screen/cal/other/src/main/java/org/jbundle/thin/base/screen/cal/opt/CachedItem.java#L270-L277 |
151,499 | jbundle/jbundle | base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java | HBasePanel.printHtmlFooter | public void printHtmlFooter(PrintWriter out, ResourceBundle reg)
{
String strHTML = reg.getString("htmlFooter");
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = "</body>\n</html>";
out.println(strHTML);
out.flush();
} | java | public void printHtmlFooter(PrintWriter out, ResourceBundle reg)
{
String strHTML = reg.getString("htmlFooter");
if ((strHTML == null) || (strHTML.length() == 0))
strHTML = "</body>\n</html>";
out.println(strHTML);
out.flush();
} | [
"public",
"void",
"printHtmlFooter",
"(",
"PrintWriter",
"out",
",",
"ResourceBundle",
"reg",
")",
"{",
"String",
"strHTML",
"=",
"reg",
".",
"getString",
"(",
"\"htmlFooter\"",
")",
";",
"if",
"(",
"(",
"strHTML",
"==",
"null",
")",
"||",
"(",
"strHTML",
... | Bottom of HTML form.
@param out The html out stream.
@param reg The resources object. | [
"Bottom",
"of",
"HTML",
"form",
"."
] | 4037fcfa85f60c7d0096c453c1a3cd573c2b0abc | https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/view/html/src/main/java/org/jbundle/base/screen/view/html/HBasePanel.java#L237-L244 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.