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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
149,400 | Omertron/api-fanarttv | src/main/java/com/omertron/fanarttvapi/FanartTvApi.java | FanartTvApi.getMusicArtist | public FTMusicArtist getMusicArtist(String id) throws FanartTvException {
URL url = ftapi.getImageUrl(BaseType.ARTIST, id);
String page = requestWebPage(url);
FTMusicArtist artist = null;
try {
artist = mapper.readValue(page, FTMusicArtist.class);
} catch (IOExcepti... | java | public FTMusicArtist getMusicArtist(String id) throws FanartTvException {
URL url = ftapi.getImageUrl(BaseType.ARTIST, id);
String page = requestWebPage(url);
FTMusicArtist artist = null;
try {
artist = mapper.readValue(page, FTMusicArtist.class);
} catch (IOExcepti... | [
"public",
"FTMusicArtist",
"getMusicArtist",
"(",
"String",
"id",
")",
"throws",
"FanartTvException",
"{",
"URL",
"url",
"=",
"ftapi",
".",
"getImageUrl",
"(",
"BaseType",
".",
"ARTIST",
",",
"id",
")",
";",
"String",
"page",
"=",
"requestWebPage",
"(",
"url... | Get images for artist
@param id
@return
@throws FanartTvException | [
"Get",
"images",
"for",
"artist"
] | 2a1854c840d8111935d0f6abe5232e2c3c3f318b | https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/FanartTvApi.java#L216-L229 |
149,401 | Omertron/api-fanarttv | src/main/java/com/omertron/fanarttvapi/FanartTvApi.java | FanartTvApi.requestWebPage | private String requestWebPage(URL url) throws FanartTvException {
try {
HttpGet httpGet = new HttpGet(url.toURI());
httpGet.addHeader("accept", "application/json");
final DigestedResponse response = DigestedResponseReader.requestContent(httpClient, httpGet, charset);
... | java | private String requestWebPage(URL url) throws FanartTvException {
try {
HttpGet httpGet = new HttpGet(url.toURI());
httpGet.addHeader("accept", "application/json");
final DigestedResponse response = DigestedResponseReader.requestContent(httpClient, httpGet, charset);
... | [
"private",
"String",
"requestWebPage",
"(",
"URL",
"url",
")",
"throws",
"FanartTvException",
"{",
"try",
"{",
"HttpGet",
"httpGet",
"=",
"new",
"HttpGet",
"(",
"url",
".",
"toURI",
"(",
")",
")",
";",
"httpGet",
".",
"addHeader",
"(",
"\"accept\"",
",",
... | Download the URL into a String
@param url
@return
@throws FanartTvException | [
"Download",
"the",
"URL",
"into",
"a",
"String"
] | 2a1854c840d8111935d0f6abe5232e2c3c3f318b | https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/FanartTvApi.java#L305-L323 |
149,402 | julienledem/brennus | brennus-builder/src/main/java/brennus/MethodCallBuilder.java | MethodCallBuilder.param | ParamExpressionBuilder<T, EB, VEB> param() {
return new ParamExpressionBuilder<T, EB, VEB>(
new ExpressionHandler<MethodCallBuilder<T, EB, VEB>>() {
public MethodCallBuilder<T, EB, VEB> handleExpression(Expression e) {
return new MethodCallBuilder<T, EB, VEB>(
factory,
... | java | ParamExpressionBuilder<T, EB, VEB> param() {
return new ParamExpressionBuilder<T, EB, VEB>(
new ExpressionHandler<MethodCallBuilder<T, EB, VEB>>() {
public MethodCallBuilder<T, EB, VEB> handleExpression(Expression e) {
return new MethodCallBuilder<T, EB, VEB>(
factory,
... | [
"ParamExpressionBuilder",
"<",
"T",
",",
"EB",
",",
"VEB",
">",
"param",
"(",
")",
"{",
"return",
"new",
"ParamExpressionBuilder",
"<",
"T",
",",
"EB",
",",
"VEB",
">",
"(",
"new",
"ExpressionHandler",
"<",
"MethodCallBuilder",
"<",
"T",
",",
"EB",
",",
... | pass a parameter to the method
@return the expressionbuilder to build the parameter value | [
"pass",
"a",
"parameter",
"to",
"the",
"method"
] | 0798fb565d95af19ddc5accd084e58c4e882dbd0 | https://github.com/julienledem/brennus/blob/0798fb565d95af19ddc5accd084e58c4e882dbd0/brennus-builder/src/main/java/brennus/MethodCallBuilder.java#L50-L62 |
149,403 | Viascom/groundwork | foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/builder/FoxHttpRequestBuilder.java | FoxHttpRequestBuilder.addRequestQueryEntry | public FoxHttpRequestBuilder addRequestQueryEntry(String name, String value) {
foxHttpRequest.getRequestQuery().addQueryEntry(name, value);
return this;
} | java | public FoxHttpRequestBuilder addRequestQueryEntry(String name, String value) {
foxHttpRequest.getRequestQuery().addQueryEntry(name, value);
return this;
} | [
"public",
"FoxHttpRequestBuilder",
"addRequestQueryEntry",
"(",
"String",
"name",
",",
"String",
"value",
")",
"{",
"foxHttpRequest",
".",
"getRequestQuery",
"(",
")",
".",
"addQueryEntry",
"(",
"name",
",",
"value",
")",
";",
"return",
"this",
";",
"}"
] | Add a new query entry
@param name name of the query entry
@param value value of the query entry
@return FoxHttpRequestBuilder (this) | [
"Add",
"a",
"new",
"query",
"entry"
] | d3f7d0df65e2e75861fc7db938090683f2cdf919 | https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/builder/FoxHttpRequestBuilder.java#L146-L149 |
149,404 | Viascom/groundwork | foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/builder/FoxHttpRequestBuilder.java | FoxHttpRequestBuilder.build | public FoxHttpRequest build() throws MalformedURLException, FoxHttpRequestException {
if (this.url != null) {
foxHttpRequest.setUrl(this.url);
}
return foxHttpRequest;
} | java | public FoxHttpRequest build() throws MalformedURLException, FoxHttpRequestException {
if (this.url != null) {
foxHttpRequest.setUrl(this.url);
}
return foxHttpRequest;
} | [
"public",
"FoxHttpRequest",
"build",
"(",
")",
"throws",
"MalformedURLException",
",",
"FoxHttpRequestException",
"{",
"if",
"(",
"this",
".",
"url",
"!=",
"null",
")",
"{",
"foxHttpRequest",
".",
"setUrl",
"(",
"this",
".",
"url",
")",
";",
"}",
"return",
... | Get the FoxHttpRequest of this builder
@return FoxHttpRequest | [
"Get",
"the",
"FoxHttpRequest",
"of",
"this",
"builder"
] | d3f7d0df65e2e75861fc7db938090683f2cdf919 | https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/builder/FoxHttpRequestBuilder.java#L261-L266 |
149,405 | lightblueseas/wicket-js-addons | wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java | JavascriptGenerator.generateJs | public String generateJs(final Settings settings, final String methodName)
{
// 1. Create an empty map...
final Map<String, Object> variables = initializeVariables(settings.asSet());
// 4. Generate the js template with the map and the method name...
final String stringTemplateContent = generateJavascriptT... | java | public String generateJs(final Settings settings, final String methodName)
{
// 1. Create an empty map...
final Map<String, Object> variables = initializeVariables(settings.asSet());
// 4. Generate the js template with the map and the method name...
final String stringTemplateContent = generateJavascriptT... | [
"public",
"String",
"generateJs",
"(",
"final",
"Settings",
"settings",
",",
"final",
"String",
"methodName",
")",
"{",
"// 1. Create an empty map...\r",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"variables",
"=",
"initializeVariables",
"(",
"settings",
"... | Generate the javascript code.
@param settings
the settings
@param methodName
the method name
@return the string | [
"Generate",
"the",
"javascript",
"code",
"."
] | b1c88c1abafd1e965f2e32ef13d66be0b28d76f6 | https://github.com/lightblueseas/wicket-js-addons/blob/b1c88c1abafd1e965f2e32ef13d66be0b28d76f6/wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java#L163-L190 |
149,406 | lightblueseas/wicket-js-addons | wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java | JavascriptGenerator.generateJsOptionsForTemplateContent | protected void generateJsOptionsForTemplateContent(final Map<String, Object> variables,
final StringBuilder sb)
{
sb.append("{\n");
int count = 1;
Object localComponentId = null;
if (withComponentId)
{
localComponentId = variables.get(COMPONENT_ID);
variables.remove(COMPONENT_ID);
}
fo... | java | protected void generateJsOptionsForTemplateContent(final Map<String, Object> variables,
final StringBuilder sb)
{
sb.append("{\n");
int count = 1;
Object localComponentId = null;
if (withComponentId)
{
localComponentId = variables.get(COMPONENT_ID);
variables.remove(COMPONENT_ID);
}
fo... | [
"protected",
"void",
"generateJsOptionsForTemplateContent",
"(",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"variables",
",",
"final",
"StringBuilder",
"sb",
")",
"{",
"sb",
".",
"append",
"(",
"\"{\\n\"",
")",
";",
"int",
"count",
"=",
"1",
";",
"... | Generate the javascript options for template content.
@param variables
the map with the javascript options.
@param sb
the {@link StringBuilder} to add the javascript options. | [
"Generate",
"the",
"javascript",
"options",
"for",
"template",
"content",
"."
] | b1c88c1abafd1e965f2e32ef13d66be0b28d76f6 | https://github.com/lightblueseas/wicket-js-addons/blob/b1c88c1abafd1e965f2e32ef13d66be0b28d76f6/wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java#L200-L230 |
149,407 | lightblueseas/wicket-js-addons | wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java | JavascriptGenerator.initializeVariables | protected Map<String, Object> initializeVariables(final Set<StringTextValue<?>> allSettings)
{
final Map<String, Object> variables = new HashMap<>();
// 2. put the component id that is the initiator for the js code...
if (withComponentId)
{
variables.put(JavascriptGenerator.COMPONENT_ID, componentId... | java | protected Map<String, Object> initializeVariables(final Set<StringTextValue<?>> allSettings)
{
final Map<String, Object> variables = new HashMap<>();
// 2. put the component id that is the initiator for the js code...
if (withComponentId)
{
variables.put(JavascriptGenerator.COMPONENT_ID, componentId... | [
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"initializeVariables",
"(",
"final",
"Set",
"<",
"StringTextValue",
"<",
"?",
">",
">",
"allSettings",
")",
"{",
"final",
"Map",
"<",
"String",
",",
"Object",
">",
"variables",
"=",
"new",
"HashMap",
... | Sets the values to the map. If the default value is set than it will not be added to the map
for later not to generate js for it.
@param allSettings
All settings as a list of StringTextValue(s).
@return the map | [
"Sets",
"the",
"values",
"to",
"the",
"map",
".",
"If",
"the",
"default",
"value",
"is",
"set",
"than",
"it",
"will",
"not",
"be",
"added",
"to",
"the",
"map",
"for",
"later",
"not",
"to",
"generate",
"js",
"for",
"it",
"."
] | b1c88c1abafd1e965f2e32ef13d66be0b28d76f6 | https://github.com/lightblueseas/wicket-js-addons/blob/b1c88c1abafd1e965f2e32ef13d66be0b28d76f6/wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/JavascriptGenerator.java#L240-L280 |
149,408 | yangjm/winlet | dao/src/main/java/com/aggrepoint/dao/DaoFactoryBean.java | DaoFactoryBean.getConversionService | private ConversionService getConversionService() {
if (conversionService != null)
return conversionService;
try {
conversionService = (ConversionService) ctx.getBean("daoConversionService");
if (conversionService != null)
return conversionService;
} catch (Exception e) {
}
Conversion... | java | private ConversionService getConversionService() {
if (conversionService != null)
return conversionService;
try {
conversionService = (ConversionService) ctx.getBean("daoConversionService");
if (conversionService != null)
return conversionService;
} catch (Exception e) {
}
Conversion... | [
"private",
"ConversionService",
"getConversionService",
"(",
")",
"{",
"if",
"(",
"conversionService",
"!=",
"null",
")",
"return",
"conversionService",
";",
"try",
"{",
"conversionService",
"=",
"(",
"ConversionService",
")",
"ctx",
".",
"getBean",
"(",
"\"daoCon... | get ConversionService. If a service is defined in context with name
daoConversionService then use it, otherwise create a default one
@return | [
"get",
"ConversionService",
".",
"If",
"a",
"service",
"is",
"defined",
"in",
"context",
"with",
"name",
"daoConversionService",
"then",
"use",
"it",
"otherwise",
"create",
"a",
"default",
"one"
] | 2126236f56858e283fa6ad69fe9279ee30f47b67 | https://github.com/yangjm/winlet/blob/2126236f56858e283fa6ad69fe9279ee30f47b67/dao/src/main/java/com/aggrepoint/dao/DaoFactoryBean.java#L110-L125 |
149,409 | javagl/Common | src/main/java/de/javagl/common/beans/PropertyChangeUtils.java | PropertyChangeUtils.isPublicInstanceMethod | private static boolean isPublicInstanceMethod(Method method)
{
return Modifier.isPublic(method.getModifiers()) &&
!Modifier.isStatic(method.getModifiers());
} | java | private static boolean isPublicInstanceMethod(Method method)
{
return Modifier.isPublic(method.getModifiers()) &&
!Modifier.isStatic(method.getModifiers());
} | [
"private",
"static",
"boolean",
"isPublicInstanceMethod",
"(",
"Method",
"method",
")",
"{",
"return",
"Modifier",
".",
"isPublic",
"(",
"method",
".",
"getModifiers",
"(",
")",
")",
"&&",
"!",
"Modifier",
".",
"isStatic",
"(",
"method",
".",
"getModifiers",
... | Returns whether the modifiers of the given method show that it is
a public instance method.
@param method The method
@return Whether the given method is a public instance method | [
"Returns",
"whether",
"the",
"modifiers",
"of",
"the",
"given",
"method",
"show",
"that",
"it",
"is",
"a",
"public",
"instance",
"method",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/PropertyChangeUtils.java#L353-L357 |
149,410 | Omertron/api-rottentomatoes | src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java | ApiBuilder.create | public static String create(Map<String, String> properties) throws RottenTomatoesException {
if (StringUtils.isBlank(apiKey)) {
throw new RottenTomatoesException(ApiExceptionType.INVALID_URL, "Missing API Key");
}
StringBuilder urlBuilder = new StringBuilder(API_SITE);
urlBu... | java | public static String create(Map<String, String> properties) throws RottenTomatoesException {
if (StringUtils.isBlank(apiKey)) {
throw new RottenTomatoesException(ApiExceptionType.INVALID_URL, "Missing API Key");
}
StringBuilder urlBuilder = new StringBuilder(API_SITE);
urlBu... | [
"public",
"static",
"String",
"create",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
")",
"throws",
"RottenTomatoesException",
"{",
"if",
"(",
"StringUtils",
".",
"isBlank",
"(",
"apiKey",
")",
")",
"{",
"throw",
"new",
"RottenTomatoesException... | Create the URL
@param properties
@return
@throws RottenTomatoesException | [
"Create",
"the",
"URL"
] | abaf1833acafc6ada593d52b14ff1bacb4e441ee | https://github.com/Omertron/api-rottentomatoes/blob/abaf1833acafc6ada593d52b14ff1bacb4e441ee/src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java#L69-L90 |
149,411 | Omertron/api-rottentomatoes | src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java | ApiBuilder.getUrlFromProps | private static String getUrlFromProps(Map<String, String> properties) throws RottenTomatoesException {
if (properties.containsKey(PROPERTY_URL) && StringUtils.isNotBlank(properties.get(PROPERTY_URL))) {
String url = properties.get(PROPERTY_URL);
// If we have the ID, then we need to rep... | java | private static String getUrlFromProps(Map<String, String> properties) throws RottenTomatoesException {
if (properties.containsKey(PROPERTY_URL) && StringUtils.isNotBlank(properties.get(PROPERTY_URL))) {
String url = properties.get(PROPERTY_URL);
// If we have the ID, then we need to rep... | [
"private",
"static",
"String",
"getUrlFromProps",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"properties",
")",
"throws",
"RottenTomatoesException",
"{",
"if",
"(",
"properties",
".",
"containsKey",
"(",
"PROPERTY_URL",
")",
"&&",
"StringUtils",
".",
"isNotB... | Get and process the URL from the properties map
@param properties
@return The processed URL
@throws RottenTomatoesException | [
"Get",
"and",
"process",
"the",
"URL",
"from",
"the",
"properties",
"map"
] | abaf1833acafc6ada593d52b14ff1bacb4e441ee | https://github.com/Omertron/api-rottentomatoes/blob/abaf1833acafc6ada593d52b14ff1bacb4e441ee/src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java#L99-L115 |
149,412 | Omertron/api-rottentomatoes | src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java | ApiBuilder.validateProperty | public static boolean validateProperty(String key, String value) {
return !StringUtils.isBlank(key) && !StringUtils.isBlank(value);
} | java | public static boolean validateProperty(String key, String value) {
return !StringUtils.isBlank(key) && !StringUtils.isBlank(value);
} | [
"public",
"static",
"boolean",
"validateProperty",
"(",
"String",
"key",
",",
"String",
"value",
")",
"{",
"return",
"!",
"StringUtils",
".",
"isBlank",
"(",
"key",
")",
"&&",
"!",
"StringUtils",
".",
"isBlank",
"(",
"value",
")",
";",
"}"
] | Validate the key and value of a property
@param key
@param value
@return | [
"Validate",
"the",
"key",
"and",
"value",
"of",
"a",
"property"
] | abaf1833acafc6ada593d52b14ff1bacb4e441ee | https://github.com/Omertron/api-rottentomatoes/blob/abaf1833acafc6ada593d52b14ff1bacb4e441ee/src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java#L124-L126 |
149,413 | Omertron/api-rottentomatoes | src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java | ApiBuilder.validateLimit | public static String validateLimit(int limit) {
if (limit < 1) {
// 0 is a valid, null value
return "";
}
if (limit > LIMIT_MAX) {
return String.valueOf(LIMIT_MAX);
}
return String.valueOf(limit);
} | java | public static String validateLimit(int limit) {
if (limit < 1) {
// 0 is a valid, null value
return "";
}
if (limit > LIMIT_MAX) {
return String.valueOf(LIMIT_MAX);
}
return String.valueOf(limit);
} | [
"public",
"static",
"String",
"validateLimit",
"(",
"int",
"limit",
")",
"{",
"if",
"(",
"limit",
"<",
"1",
")",
"{",
"// 0 is a valid, null value",
"return",
"\"\"",
";",
"}",
"if",
"(",
"limit",
">",
"LIMIT_MAX",
")",
"{",
"return",
"String",
".",
"val... | Validate and convert the limit property
@param limit
@return | [
"Validate",
"and",
"convert",
"the",
"limit",
"property"
] | abaf1833acafc6ada593d52b14ff1bacb4e441ee | https://github.com/Omertron/api-rottentomatoes/blob/abaf1833acafc6ada593d52b14ff1bacb4e441ee/src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java#L134-L145 |
149,414 | Omertron/api-rottentomatoes | src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java | ApiBuilder.validateCountry | public static String validateCountry(String country) {
if (country.length() > DEFAULT_COUNTRY_LEN) {
return country.substring(0, DEFAULT_COUNTRY_LEN);
}
return country;
} | java | public static String validateCountry(String country) {
if (country.length() > DEFAULT_COUNTRY_LEN) {
return country.substring(0, DEFAULT_COUNTRY_LEN);
}
return country;
} | [
"public",
"static",
"String",
"validateCountry",
"(",
"String",
"country",
")",
"{",
"if",
"(",
"country",
".",
"length",
"(",
")",
">",
"DEFAULT_COUNTRY_LEN",
")",
"{",
"return",
"country",
".",
"substring",
"(",
"0",
",",
"DEFAULT_COUNTRY_LEN",
")",
";",
... | Validate the country property
@param country
@return | [
"Validate",
"the",
"country",
"property"
] | abaf1833acafc6ada593d52b14ff1bacb4e441ee | https://github.com/Omertron/api-rottentomatoes/blob/abaf1833acafc6ada593d52b14ff1bacb4e441ee/src/main/java/com/omertron/rottentomatoesapi/tools/ApiBuilder.java#L178-L184 |
149,415 | Omertron/api-fanarttv | src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java | ArtworkList.addArtwork | public void addArtwork(FTArtworkType artworkType, List<FTArtwork> artworkList) {
artwork.put(artworkType, artworkList);
} | java | public void addArtwork(FTArtworkType artworkType, List<FTArtwork> artworkList) {
artwork.put(artworkType, artworkList);
} | [
"public",
"void",
"addArtwork",
"(",
"FTArtworkType",
"artworkType",
",",
"List",
"<",
"FTArtwork",
">",
"artworkList",
")",
"{",
"artwork",
".",
"put",
"(",
"artworkType",
",",
"artworkList",
")",
";",
"}"
] | Add artwork to the list
@param artworkType
@param artworkList | [
"Add",
"artwork",
"to",
"the",
"list"
] | 2a1854c840d8111935d0f6abe5232e2c3c3f318b | https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java#L47-L49 |
149,416 | Omertron/api-fanarttv | src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java | ArtworkList.getArtwork | @Override
public List<FTArtwork> getArtwork(FTArtworkType artworkType) {
if (artwork.containsKey(artworkType)) {
return artwork.get(artworkType);
}
return Collections.emptyList();
} | java | @Override
public List<FTArtwork> getArtwork(FTArtworkType artworkType) {
if (artwork.containsKey(artworkType)) {
return artwork.get(artworkType);
}
return Collections.emptyList();
} | [
"@",
"Override",
"public",
"List",
"<",
"FTArtwork",
">",
"getArtwork",
"(",
"FTArtworkType",
"artworkType",
")",
"{",
"if",
"(",
"artwork",
".",
"containsKey",
"(",
"artworkType",
")",
")",
"{",
"return",
"artwork",
".",
"get",
"(",
"artworkType",
")",
";... | Get a specific type of artwork
@param artworkType
@return | [
"Get",
"a",
"specific",
"type",
"of",
"artwork"
] | 2a1854c840d8111935d0f6abe5232e2c3c3f318b | https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java#L67-L73 |
149,417 | Omertron/api-fanarttv | src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java | ArtworkList.hasArtwork | @Override
public boolean hasArtwork() {
for (FTArtworkType at : FTArtworkType.values()) {
// We're not countin the artwork, we're seeing if any exists, so quit when we find something
if (hasArtwork(at) && !artwork.isEmpty()) {
return true;
}
}
... | java | @Override
public boolean hasArtwork() {
for (FTArtworkType at : FTArtworkType.values()) {
// We're not countin the artwork, we're seeing if any exists, so quit when we find something
if (hasArtwork(at) && !artwork.isEmpty()) {
return true;
}
}
... | [
"@",
"Override",
"public",
"boolean",
"hasArtwork",
"(",
")",
"{",
"for",
"(",
"FTArtworkType",
"at",
":",
"FTArtworkType",
".",
"values",
"(",
")",
")",
"{",
"// We're not countin the artwork, we're seeing if any exists, so quit when we find something",
"if",
"(",
"has... | Determines if there is any artwork associated with the series
@return | [
"Determines",
"if",
"there",
"is",
"any",
"artwork",
"associated",
"with",
"the",
"series"
] | 2a1854c840d8111935d0f6abe5232e2c3c3f318b | https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java#L80-L89 |
149,418 | Omertron/api-fanarttv | src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java | ArtworkList.hasArtwork | @Override
public boolean hasArtwork(FTArtworkType artworkType) {
return artwork.containsKey(artworkType) && !artwork.get(artworkType).isEmpty();
} | java | @Override
public boolean hasArtwork(FTArtworkType artworkType) {
return artwork.containsKey(artworkType) && !artwork.get(artworkType).isEmpty();
} | [
"@",
"Override",
"public",
"boolean",
"hasArtwork",
"(",
"FTArtworkType",
"artworkType",
")",
"{",
"return",
"artwork",
".",
"containsKey",
"(",
"artworkType",
")",
"&&",
"!",
"artwork",
".",
"get",
"(",
"artworkType",
")",
".",
"isEmpty",
"(",
")",
";",
"... | Determines if the series has a specific type of artwork
@param artworkType
@return | [
"Determines",
"if",
"the",
"series",
"has",
"a",
"specific",
"type",
"of",
"artwork"
] | 2a1854c840d8111935d0f6abe5232e2c3c3f318b | https://github.com/Omertron/api-fanarttv/blob/2a1854c840d8111935d0f6abe5232e2c3c3f318b/src/main/java/com/omertron/fanarttvapi/model/ArtworkList.java#L97-L100 |
149,419 | Viascom/groundwork | foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/response/serviceresult/FoxHttpServiceResultResponse.java | FoxHttpServiceResultResponse.getFault | public ServiceFault getFault(boolean checkHash) throws FoxHttpResponseException {
try {
String body = getStringBody();
ServiceResult<ServiceFault> result = parser.fromJson(body, new TypeToken<ServiceResult<ServiceFault>>() {
}.getType());
foxHttpClient.getFoxHtt... | java | public ServiceFault getFault(boolean checkHash) throws FoxHttpResponseException {
try {
String body = getStringBody();
ServiceResult<ServiceFault> result = parser.fromJson(body, new TypeToken<ServiceResult<ServiceFault>>() {
}.getType());
foxHttpClient.getFoxHtt... | [
"public",
"ServiceFault",
"getFault",
"(",
"boolean",
"checkHash",
")",
"throws",
"FoxHttpResponseException",
"{",
"try",
"{",
"String",
"body",
"=",
"getStringBody",
"(",
")",
";",
"ServiceResult",
"<",
"ServiceFault",
">",
"result",
"=",
"parser",
".",
"fromJs... | Get the fault of the service result
@param checkHash should the result be checked
@return deserialized fault of the service result
@throws FoxHttpResponseException Exception during the deserialization | [
"Get",
"the",
"fault",
"of",
"the",
"service",
"result"
] | d3f7d0df65e2e75861fc7db938090683f2cdf919 | https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/response/serviceresult/FoxHttpServiceResultResponse.java#L285-L301 |
149,420 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.create | public TableRef create(Key key, Throughput throughput, OnTableCreation onTableCreation, OnError onError) {
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
pbb.addObject("provisionType", StorageProvisionType.CUSTOM.getValue());
pbb.addObject("key", key.map());
pbb.addObje... | java | public TableRef create(Key key, Throughput throughput, OnTableCreation onTableCreation, OnError onError) {
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
pbb.addObject("provisionType", StorageProvisionType.CUSTOM.getValue());
pbb.addObject("key", key.map());
pbb.addObje... | [
"public",
"TableRef",
"create",
"(",
"Key",
"key",
",",
"Throughput",
"throughput",
",",
"OnTableCreation",
"onTableCreation",
",",
"OnError",
"onError",
")",
"{",
"PostBodyBuilder",
"pbb",
"=",
"new",
"PostBodyBuilder",
"(",
"context",
")",
";",
"pbb",
".",
"... | Creates a table with a custom throughput. The provision type is Custom and the provision load is ignored.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Create table 'myTable' with the following schema (with custom provisioning)
tableRef.c... | [
"Creates",
"a",
"table",
"with",
"a",
"custom",
"throughput",
".",
"The",
"provision",
"type",
"is",
"Custom",
"and",
"the",
"provision",
"load",
"is",
"ignored",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L194-L206 |
149,421 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.create | public TableRef create(Key key, StorageProvisionType provisionType, StorageProvisionLoad provisionLoad, OnTableCreation onTableCreation, OnError onError) {
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
pbb.addObject("provisionLoad", provisionLoad.getValue());
pbb.addObje... | java | public TableRef create(Key key, StorageProvisionType provisionType, StorageProvisionLoad provisionLoad, OnTableCreation onTableCreation, OnError onError) {
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
pbb.addObject("provisionLoad", provisionLoad.getValue());
pbb.addObje... | [
"public",
"TableRef",
"create",
"(",
"Key",
"key",
",",
"StorageProvisionType",
"provisionType",
",",
"StorageProvisionLoad",
"provisionLoad",
",",
"OnTableCreation",
"onTableCreation",
",",
"OnError",
"onError",
")",
"{",
"PostBodyBuilder",
"pbb",
"=",
"new",
"PostBo... | Creates a table with a
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Create table "your_table" with the following schema
tableRef.create(new Key(new KeySchema("id", StorageRef.StorageDataType.STRING),new KeySchema("timestamp", StorageRef.... | [
"Creates",
"a",
"table",
"with",
"a"
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L238-L250 |
149,422 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.del | public void del(OnBooleanResponse onBooleanResponse, OnError onError){
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
Rest r = new Rest(context, RestType.DELETETABLE, pbb, null);
r.onError = onError;
r.onBooleanResponse = onBooleanResponse;
context.processRest(r); ... | java | public void del(OnBooleanResponse onBooleanResponse, OnError onError){
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
Rest r = new Rest(context, RestType.DELETETABLE, pbb, null);
r.onError = onError;
r.onBooleanResponse = onBooleanResponse;
context.processRest(r); ... | [
"public",
"void",
"del",
"(",
"OnBooleanResponse",
"onBooleanResponse",
",",
"OnError",
"onError",
")",
"{",
"PostBodyBuilder",
"pbb",
"=",
"new",
"PostBodyBuilder",
"(",
"context",
")",
";",
"pbb",
".",
"addObject",
"(",
"\"table\"",
",",
"this",
".",
"name",... | Delete this table.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Delete table 'your_table'
tableRef.del(new OnBooleanResponse() {
@Override
public void run(Boolean aBoolean) {
Log.d("TableRef", "Deleted? : " + aBoolean);
}
},new OnEr... | [
"Delete",
"this",
"table",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L279-L286 |
149,423 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.meta | public TableRef meta(OnTableMetadata onTableMetadata, OnError onError){
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
Rest r = new Rest(context, RestType.DESCRIBETABLE, pbb, null);
r.onError = onError;
r.onTableMetadata = onTableMetadata;
context.processRest(r);
... | java | public TableRef meta(OnTableMetadata onTableMetadata, OnError onError){
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
Rest r = new Rest(context, RestType.DESCRIBETABLE, pbb, null);
r.onError = onError;
r.onTableMetadata = onTableMetadata;
context.processRest(r);
... | [
"public",
"TableRef",
"meta",
"(",
"OnTableMetadata",
"onTableMetadata",
",",
"OnError",
"onError",
")",
"{",
"PostBodyBuilder",
"pbb",
"=",
"new",
"PostBodyBuilder",
"(",
"context",
")",
";",
"pbb",
".",
"addObject",
"(",
"\"table\"",
",",
"this",
".",
"name"... | Gets the metadata of the table reference.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
tableRef.meta(new OnTableMetadata() {
@Override
public void run(TableMetadata tableMetadata) {
if(tableMetadata != null){
Log.d("TableRef", "TableMe... | [
"Gets",
"the",
"metadata",
"of",
"the",
"table",
"reference",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L318-L326 |
149,424 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.push | public TableRef push(LinkedHashMap<String, ItemAttribute> item, OnItemSnapshot onItemSnapshot, OnError onError){
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
pbb.addObject("item", item);
Rest r = new Rest(context, RestType.PUTITEM, pbb, this);
r.onError = onError;
r... | java | public TableRef push(LinkedHashMap<String, ItemAttribute> item, OnItemSnapshot onItemSnapshot, OnError onError){
PostBodyBuilder pbb = new PostBodyBuilder(context);
pbb.addObject("table", this.name);
pbb.addObject("item", item);
Rest r = new Rest(context, RestType.PUTITEM, pbb, this);
r.onError = onError;
r... | [
"public",
"TableRef",
"push",
"(",
"LinkedHashMap",
"<",
"String",
",",
"ItemAttribute",
">",
"item",
",",
"OnItemSnapshot",
"onItemSnapshot",
",",
"OnError",
"onError",
")",
"{",
"PostBodyBuilder",
"pbb",
"=",
"new",
"PostBodyBuilder",
"(",
"context",
")",
";",... | Adds a new item to the table.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
LinkedHashMap<String,ItemAttribute> lhm = new LinkedHashMap<String,ItemAttribute>();
// Put elements to the map
lhm.put("your_primary_key", new ItemAttribute("ne... | [
"Adds",
"a",
"new",
"item",
"to",
"the",
"table",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L445-L454 |
149,425 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.update | public TableRef update(final StorageProvisionLoad provisionLoad, final StorageProvisionType provisionType, final OnTableUpdate onTableUpdate, final OnError onError){
TableMetadata tm = context.getTableMeta(this.name);
if(tm == null){
this.meta(new OnTableMetadata(){
@Override
public void run(TableMetadat... | java | public TableRef update(final StorageProvisionLoad provisionLoad, final StorageProvisionType provisionType, final OnTableUpdate onTableUpdate, final OnError onError){
TableMetadata tm = context.getTableMeta(this.name);
if(tm == null){
this.meta(new OnTableMetadata(){
@Override
public void run(TableMetadat... | [
"public",
"TableRef",
"update",
"(",
"final",
"StorageProvisionLoad",
"provisionLoad",
",",
"final",
"StorageProvisionType",
"provisionType",
",",
"final",
"OnTableUpdate",
"onTableUpdate",
",",
"final",
"OnError",
"onError",
")",
"{",
"TableMetadata",
"tm",
"=",
"con... | Updates the provision type and provision load of the referenced table.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
//change ProvisionType
//Note: you can't change ProvisionType and ProvisionLoad at the same time
tableRef.update(StorageRef.... | [
"Updates",
"the",
"provision",
"type",
"and",
"provision",
"load",
"of",
"the",
"referenced",
"table",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L542-L555 |
149,426 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.notEqual | public TableRef notEqual(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.NOTEQUAL, attributeName, value, null));
return this;
} | java | public TableRef notEqual(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.NOTEQUAL, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"notEqual",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"NOTEQUAL",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";",
"... | Applies a filter to the table. When fetched, it will return the items that does not match the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items that have their "itemProperty" value equal to "theValue"... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"that",
"does",
"not",
"match",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L623-L626 |
149,427 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.greaterEqual | public TableRef greaterEqual(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.GREATEREQUAL, attributeName, value, null));
return this;
} | java | public TableRef greaterEqual(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.GREATEREQUAL, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"greaterEqual",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"GREATEREQUAL",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
... | Applies a filter to the table. When fetched, it will return the items greater or equal to filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = tableRef = storage.table("your_table");
// Retrieve all items that have their "itemProperty" value greater or e... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"greater",
"or",
"equal",
"to",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L658-L661 |
149,428 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.greaterThan | public TableRef greaterThan(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.GREATERTHAN, attributeName, value, null));
return this;
} | java | public TableRef greaterThan(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.GREATERTHAN, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"greaterThan",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"GREATERTHAN",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";... | Applies a filter to the table. When fetched, it will return the items greater than the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items that have their "itemProperty" value greater than 10
tableRef.g... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"greater",
"than",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L693-L696 |
149,429 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.lessEqual | public TableRef lessEqual(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.LESSEREQUAL, attributeName, value, null));
return this;
} | java | public TableRef lessEqual(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.LESSEREQUAL, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"lessEqual",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"LESSEREQUAL",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";",... | Applies a filter to the table. When fetched, it will return the items lesser or equals to the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items that have their "itemProperty" value lesser or equal 10
... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"lesser",
"or",
"equals",
"to",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L728-L731 |
149,430 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.lessThan | public TableRef lessThan(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.LESSERTHAN, attributeName, value, null));
return this;
} | java | public TableRef lessThan(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.LESSERTHAN, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"lessThan",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"LESSERTHAN",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";",
... | Applies a filter to the table. When fetched, it will return the items lesser than the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items that have their "itemProperty" value lesser than 10
tableRef.les... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"lesser",
"than",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L763-L766 |
149,431 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.notNull | public TableRef notNull(String attributeName){
filters.add(new Filter(StorageFilter.NOTNULL, attributeName, null, null));
return this;
} | java | public TableRef notNull(String attributeName){
filters.add(new Filter(StorageFilter.NOTNULL, attributeName, null, null));
return this;
} | [
"public",
"TableRef",
"notNull",
"(",
"String",
"attributeName",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"NOTNULL",
",",
"attributeName",
",",
"null",
",",
"null",
")",
")",
";",
"return",
"this",
";",
"}"
] | Applies a filter to the table reference. When fetched, it will return the non null values.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items where their "itemProperty" value is not null
tableRef.notNull("itemProperty").getI... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
"reference",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"non",
"null",
"values",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L796-L799 |
149,432 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.isNull | public TableRef isNull(String attributeName){
filters.add(new Filter(StorageFilter.NULL, attributeName, null, null));
return this;
} | java | public TableRef isNull(String attributeName){
filters.add(new Filter(StorageFilter.NULL, attributeName, null, null));
return this;
} | [
"public",
"TableRef",
"isNull",
"(",
"String",
"attributeName",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"NULL",
",",
"attributeName",
",",
"null",
",",
"null",
")",
")",
";",
"return",
"this",
";",
"}"
] | Applies a filter to the table. When fetched, it will return the null values.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items where their "itemProperty" value is null
tableRef.isNull("itemProperty").getItems(new OnItemSnap... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"null",
"values",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L829-L832 |
149,433 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.contains | public TableRef contains(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.CONTAINS, attributeName, value, null));
return this;
} | java | public TableRef contains(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.CONTAINS, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"contains",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"CONTAINS",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";",
"... | Applies a filter to the table. When fetched, it will return the items that contains the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items with property "itemProperty" contains the value "xpto"
tableRe... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"that",
"contains",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L863-L866 |
149,434 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.notContains | public TableRef notContains(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.NOTCONTAINS, attributeName, value, null));
return this;
} | java | public TableRef notContains(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.NOTCONTAINS, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"notContains",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"NOTCONTAINS",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";... | Applies a filter to the table. When fetched, it will return the items that does not contains the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items with property "itemProperty" contains the value "xpto... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"that",
"does",
"not",
"contains",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L897-L900 |
149,435 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.beginsWith | public TableRef beginsWith(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.BEGINSWITH, attributeName, value, null));
return this;
} | java | public TableRef beginsWith(String attributeName, ItemAttribute value){
filters.add(new Filter(StorageFilter.BEGINSWITH, attributeName, value, null));
return this;
} | [
"public",
"TableRef",
"beginsWith",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"value",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"BEGINSWITH",
",",
"attributeName",
",",
"value",
",",
"null",
")",
")",
";",... | Applies a filter to the table. When fetched, it will return the items that begins with the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items with property "itemProperty" value starting with "xpto"
tab... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"that",
"begins",
"with",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L931-L934 |
149,436 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.between | public TableRef between(String attributeName, ItemAttribute startValue, ItemAttribute endValue){
filters.add(new Filter(StorageFilter.BETWEEN, attributeName, startValue, endValue));
return this;
} | java | public TableRef between(String attributeName, ItemAttribute startValue, ItemAttribute endValue){
filters.add(new Filter(StorageFilter.BETWEEN, attributeName, startValue, endValue));
return this;
} | [
"public",
"TableRef",
"between",
"(",
"String",
"attributeName",
",",
"ItemAttribute",
"startValue",
",",
"ItemAttribute",
"endValue",
")",
"{",
"filters",
".",
"add",
"(",
"new",
"Filter",
"(",
"StorageFilter",
".",
"BETWEEN",
",",
"attributeName",
",",
"startV... | Applies a filter to the table. When fetched, it will return the items in range of the filter property value.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Retrieve all items where property "itemProperty" has a value between 1 and 10
tabl... | [
"Applies",
"a",
"filter",
"to",
"the",
"table",
".",
"When",
"fetched",
"it",
"will",
"return",
"the",
"items",
"in",
"range",
"of",
"the",
"filter",
"property",
"value",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L967-L970 |
149,437 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef._tryConstructKey | private RestType _tryConstructKey(TableMetadata tm) {
for(Filter f : filters)
if(f.operator==StorageFilter.NOTEQUAL || f.operator==StorageFilter.NOTNULL || f.operator==StorageFilter.NULL ||
f.operator==StorageFilter.CONTAINS || f.operator==StorageFilter.NOTCONTAINS)
return RestType.LISTITEMS; //because quer... | java | private RestType _tryConstructKey(TableMetadata tm) {
for(Filter f : filters)
if(f.operator==StorageFilter.NOTEQUAL || f.operator==StorageFilter.NOTNULL || f.operator==StorageFilter.NULL ||
f.operator==StorageFilter.CONTAINS || f.operator==StorageFilter.NOTCONTAINS)
return RestType.LISTITEMS; //because quer... | [
"private",
"RestType",
"_tryConstructKey",
"(",
"TableMetadata",
"tm",
")",
"{",
"for",
"(",
"Filter",
"f",
":",
"filters",
")",
"if",
"(",
"f",
".",
"operator",
"==",
"StorageFilter",
".",
"NOTEQUAL",
"||",
"f",
".",
"operator",
"==",
"StorageFilter",
"."... | if returns null the rest type is listItems, otherwise queryItems | [
"if",
"returns",
"null",
"the",
"rest",
"type",
"is",
"listItems",
"otherwise",
"queryItems"
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L1025-L1072 |
149,438 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.getItems | public TableRef getItems(final OnItemSnapshot onItemSnapshot, final OnError onError){
TableMetadata tm = context.getTableMeta(this.name);
if(tm == null){
this.meta(new OnTableMetadata(){
@Override
public void run(TableMetadata tableMetadata) {
_getItems(onItemSnapshot, onError);
}
}, onEr... | java | public TableRef getItems(final OnItemSnapshot onItemSnapshot, final OnError onError){
TableMetadata tm = context.getTableMeta(this.name);
if(tm == null){
this.meta(new OnTableMetadata(){
@Override
public void run(TableMetadata tableMetadata) {
_getItems(onItemSnapshot, onError);
}
}, onEr... | [
"public",
"TableRef",
"getItems",
"(",
"final",
"OnItemSnapshot",
"onItemSnapshot",
",",
"final",
"OnError",
"onError",
")",
"{",
"TableMetadata",
"tm",
"=",
"context",
".",
"getTableMeta",
"(",
"this",
".",
"name",
")",
";",
"if",
"(",
"tm",
"==",
"null",
... | Get the items of this tableRef.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
tableRef.getItems(new OnItemSnapshot() {
@Override
public void run(ItemSnapshot itemSnapshot) {
if (itemSnapshot != null) {
Log.d("TableRef", "Item retrieved:... | [
"Get",
"the",
"items",
"of",
"this",
"tableRef",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L1104-L1117 |
149,439 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.item | public ItemRef item(ItemAttribute primaryKeyValue, ItemAttribute secondaryKeyValue){
return new ItemRef(context, this, primaryKeyValue, secondaryKeyValue);
} | java | public ItemRef item(ItemAttribute primaryKeyValue, ItemAttribute secondaryKeyValue){
return new ItemRef(context, this, primaryKeyValue, secondaryKeyValue);
} | [
"public",
"ItemRef",
"item",
"(",
"ItemAttribute",
"primaryKeyValue",
",",
"ItemAttribute",
"secondaryKeyValue",
")",
"{",
"return",
"new",
"ItemRef",
"(",
"context",
",",
"this",
",",
"primaryKeyValue",
",",
"secondaryKeyValue",
")",
";",
"}"
] | Creates a new item reference.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
ItemRef itemRef = tableRef.item(new ItemAttribute("your_primary_key_value"),new ItemAttribute("your_secondary_key_value"));
</pre>
@param primaryKeyValue
The prima... | [
"Creates",
"a",
"new",
"item",
"reference",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L1157-L1159 |
149,440 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.on | public TableRef on(StorageEvent eventType, final OnItemSnapshot onItemSnapshot) {
return on(eventType, onItemSnapshot, null);
} | java | public TableRef on(StorageEvent eventType, final OnItemSnapshot onItemSnapshot) {
return on(eventType, onItemSnapshot, null);
} | [
"public",
"TableRef",
"on",
"(",
"StorageEvent",
"eventType",
",",
"final",
"OnItemSnapshot",
"onItemSnapshot",
")",
"{",
"return",
"on",
"(",
"eventType",
",",
"onItemSnapshot",
",",
"null",
")",
";",
"}"
] | Attach a listener to run every time the eventType occurs.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Add an update listener
tableRef.on(StorageRef.StorageEvent.UPDATE, new OnItemSnapshot() {
@Override
public void run(ItemSnapshot ... | [
"Attach",
"a",
"listener",
"to",
"run",
"every",
"time",
"the",
"eventType",
"occurs",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L1245-L1247 |
149,441 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.once | public TableRef once(StorageEvent eventType, final OnItemSnapshot onItemSnapshot, final OnError onError) {
if(eventType == StorageEvent.PUT) {
getItems(onItemSnapshot, onError);
}
Event ev = new Event(eventType, this.name, null, null, true, true, pushNotificationsEnabled, onItemSnapshot);
context.addEvent(ev... | java | public TableRef once(StorageEvent eventType, final OnItemSnapshot onItemSnapshot, final OnError onError) {
if(eventType == StorageEvent.PUT) {
getItems(onItemSnapshot, onError);
}
Event ev = new Event(eventType, this.name, null, null, true, true, pushNotificationsEnabled, onItemSnapshot);
context.addEvent(ev... | [
"public",
"TableRef",
"once",
"(",
"StorageEvent",
"eventType",
",",
"final",
"OnItemSnapshot",
"onItemSnapshot",
",",
"final",
"OnError",
"onError",
")",
"{",
"if",
"(",
"eventType",
"==",
"StorageEvent",
".",
"PUT",
")",
"{",
"getItems",
"(",
"onItemSnapshot",... | Attach a listener to run only once the event type occurs.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
// Add an update listener. Only one notification is received once the item is updated after the listener is set
tableRef.once(StorageRef.... | [
"Attach",
"a",
"listener",
"to",
"run",
"only",
"once",
"the",
"event",
"type",
"occurs",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L1381-L1388 |
149,442 | realtime-framework/RealtimeStorage-Android | library/src/main/java/co/realtime/storage/TableRef.java | TableRef.off | public TableRef off(StorageEvent eventType, OnItemSnapshot onItemSnapshot) {
Event ev = new Event(eventType, this.name, null, null, false, true, false, onItemSnapshot);
context.removeEvent(ev);
return this;
} | java | public TableRef off(StorageEvent eventType, OnItemSnapshot onItemSnapshot) {
Event ev = new Event(eventType, this.name, null, null, false, true, false, onItemSnapshot);
context.removeEvent(ev);
return this;
} | [
"public",
"TableRef",
"off",
"(",
"StorageEvent",
"eventType",
",",
"OnItemSnapshot",
"onItemSnapshot",
")",
"{",
"Event",
"ev",
"=",
"new",
"Event",
"(",
"eventType",
",",
"this",
".",
"name",
",",
"null",
",",
"null",
",",
"false",
",",
"true",
",",
"f... | Remove an event handler.
<pre>
StorageRef storage = new StorageRef("your_app_key", "your_token");
TableRef tableRef = storage.table("your_table");
//Define handler function
final OnItemSnapshot itemSnapshot = new OnItemSnapshot() {
@Override
public void run(ItemSnapshot itemSnapshot) {
if (itemSnapshot != null... | [
"Remove",
"an",
"event",
"handler",
"."
] | 05816a6b7a6dcc83f9e7400ac3048494dadca302 | https://github.com/realtime-framework/RealtimeStorage-Android/blob/05816a6b7a6dcc83f9e7400ac3048494dadca302/library/src/main/java/co/realtime/storage/TableRef.java#L1503-L1507 |
149,443 | jiaqi/caff | src/main/java/org/cyclopsgroup/caff/util/UUIDUtils.java | UUIDUtils.fromBytes | public static UUID fromBytes(byte[] bytes) {
long mostBits = ByteUtils.readLong(bytes, 0);
long leastBits = 0;
if (bytes.length > 8) {
leastBits = ByteUtils.readLong(bytes, 8);
}
return new UUID(mostBits, leastBits);
} | java | public static UUID fromBytes(byte[] bytes) {
long mostBits = ByteUtils.readLong(bytes, 0);
long leastBits = 0;
if (bytes.length > 8) {
leastBits = ByteUtils.readLong(bytes, 8);
}
return new UUID(mostBits, leastBits);
} | [
"public",
"static",
"UUID",
"fromBytes",
"(",
"byte",
"[",
"]",
"bytes",
")",
"{",
"long",
"mostBits",
"=",
"ByteUtils",
".",
"readLong",
"(",
"bytes",
",",
"0",
")",
";",
"long",
"leastBits",
"=",
"0",
";",
"if",
"(",
"bytes",
".",
"length",
">",
... | Convert byte array into UUID. Byte array is a compact form of bits in UUID
@param bytes Byte array to convert from
@return UUID result | [
"Convert",
"byte",
"array",
"into",
"UUID",
".",
"Byte",
"array",
"is",
"a",
"compact",
"form",
"of",
"bits",
"in",
"UUID"
] | dba4b937a0afc844eb37ccf74dd04dd78f0c1314 | https://github.com/jiaqi/caff/blob/dba4b937a0afc844eb37ccf74dd04dd78f0c1314/src/main/java/org/cyclopsgroup/caff/util/UUIDUtils.java#L18-L25 |
149,444 | jiaqi/caff | src/main/java/org/cyclopsgroup/caff/util/UUIDUtils.java | UUIDUtils.toBytes | public static byte[] toBytes(UUID id) {
byte[] bytes = new byte[16];
ByteUtils.writeLong(id.getMostSignificantBits(), bytes, 0);
ByteUtils.writeLong(id.getLeastSignificantBits(), bytes, 8);
return bytes;
} | java | public static byte[] toBytes(UUID id) {
byte[] bytes = new byte[16];
ByteUtils.writeLong(id.getMostSignificantBits(), bytes, 0);
ByteUtils.writeLong(id.getLeastSignificantBits(), bytes, 8);
return bytes;
} | [
"public",
"static",
"byte",
"[",
"]",
"toBytes",
"(",
"UUID",
"id",
")",
"{",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"16",
"]",
";",
"ByteUtils",
".",
"writeLong",
"(",
"id",
".",
"getMostSignificantBits",
"(",
")",
",",
"bytes",
",",
... | Convert UUID in compact form of byte array
@param id UUID to convert from
@return Byte array result | [
"Convert",
"UUID",
"in",
"compact",
"form",
"of",
"byte",
"array"
] | dba4b937a0afc844eb37ccf74dd04dd78f0c1314 | https://github.com/jiaqi/caff/blob/dba4b937a0afc844eb37ccf74dd04dd78f0c1314/src/main/java/org/cyclopsgroup/caff/util/UUIDUtils.java#L43-L48 |
149,445 | jiaqi/caff | src/main/java/org/cyclopsgroup/caff/format/Formats.java | Formats.newFixLengthFormat | public static <T> Format<T> newFixLengthFormat(Class<T> beanType) {
return new FixLengthFormat<T>(beanType);
} | java | public static <T> Format<T> newFixLengthFormat(Class<T> beanType) {
return new FixLengthFormat<T>(beanType);
} | [
"public",
"static",
"<",
"T",
">",
"Format",
"<",
"T",
">",
"newFixLengthFormat",
"(",
"Class",
"<",
"T",
">",
"beanType",
")",
"{",
"return",
"new",
"FixLengthFormat",
"<",
"T",
">",
"(",
"beanType",
")",
";",
"}"
] | Create new text format for fix-length syntax
@param <T> Type of bean
@param beanType Type of bean
@return Fix length format of given type | [
"Create",
"new",
"text",
"format",
"for",
"fix",
"-",
"length",
"syntax"
] | dba4b937a0afc844eb37ccf74dd04dd78f0c1314 | https://github.com/jiaqi/caff/blob/dba4b937a0afc844eb37ccf74dd04dd78f0c1314/src/main/java/org/cyclopsgroup/caff/format/Formats.java#L18-L20 |
149,446 | jiaqi/caff | src/main/java/org/cyclopsgroup/caff/format/Formats.java | Formats.newCSVFormat | public static <T> Format<T> newCSVFormat(Class<T> beanType) {
return new CSVFormat<T>(beanType);
} | java | public static <T> Format<T> newCSVFormat(Class<T> beanType) {
return new CSVFormat<T>(beanType);
} | [
"public",
"static",
"<",
"T",
">",
"Format",
"<",
"T",
">",
"newCSVFormat",
"(",
"Class",
"<",
"T",
">",
"beanType",
")",
"{",
"return",
"new",
"CSVFormat",
"<",
"T",
">",
"(",
"beanType",
")",
";",
"}"
] | Create new text format for CSV syntax
@param <T> Type of bean
@param beanType Type of bean
@return CSV implementation of format | [
"Create",
"new",
"text",
"format",
"for",
"CSV",
"syntax"
] | dba4b937a0afc844eb37ccf74dd04dd78f0c1314 | https://github.com/jiaqi/caff/blob/dba4b937a0afc844eb37ccf74dd04dd78f0c1314/src/main/java/org/cyclopsgroup/caff/format/Formats.java#L29-L31 |
149,447 | yangjm/winlet | dao/src/main/java/com/aggrepoint/service/ServiceClassLoader.java | ServiceClassLoader.implementsInterface | public static boolean implementsInterface(Class<?> c, Class<?> i) {
if (c == i)
return true;
for (Class<?> x : c.getInterfaces())
if (implementsInterface(x, i))
return true;
return false;
} | java | public static boolean implementsInterface(Class<?> c, Class<?> i) {
if (c == i)
return true;
for (Class<?> x : c.getInterfaces())
if (implementsInterface(x, i))
return true;
return false;
} | [
"public",
"static",
"boolean",
"implementsInterface",
"(",
"Class",
"<",
"?",
">",
"c",
",",
"Class",
"<",
"?",
">",
"i",
")",
"{",
"if",
"(",
"c",
"==",
"i",
")",
"return",
"true",
";",
"for",
"(",
"Class",
"<",
"?",
">",
"x",
":",
"c",
".",
... | Check whether c implements interface i
@param c
@param i
@return | [
"Check",
"whether",
"c",
"implements",
"interface",
"i"
] | 2126236f56858e283fa6ad69fe9279ee30f47b67 | https://github.com/yangjm/winlet/blob/2126236f56858e283fa6ad69fe9279ee30f47b67/dao/src/main/java/com/aggrepoint/service/ServiceClassLoader.java#L108-L117 |
149,448 | lightblueseas/wicket-js-addons | wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/StringTextValue.java | StringTextValue.setValue | public StringTextValue<T> setValue(final T value, final boolean initialValue)
{
this.initialValue = initialValue;
this.value = value;
return this;
} | java | public StringTextValue<T> setValue(final T value, final boolean initialValue)
{
this.initialValue = initialValue;
this.value = value;
return this;
} | [
"public",
"StringTextValue",
"<",
"T",
">",
"setValue",
"(",
"final",
"T",
"value",
",",
"final",
"boolean",
"initialValue",
")",
"{",
"this",
".",
"initialValue",
"=",
"initialValue",
";",
"this",
".",
"value",
"=",
"value",
";",
"return",
"this",
";",
... | Sets the given value and set the initalValue flag if the flag should keep his state.
@param value
the value
@param initialValue
this flag tells the generator if the value is initial. This flag is taken for the
generation of javascript, if false this {@link StringTextValue} will be not added.
@return the string text va... | [
"Sets",
"the",
"given",
"value",
"and",
"set",
"the",
"initalValue",
"flag",
"if",
"the",
"flag",
"should",
"keep",
"his",
"state",
"."
] | b1c88c1abafd1e965f2e32ef13d66be0b28d76f6 | https://github.com/lightblueseas/wicket-js-addons/blob/b1c88c1abafd1e965f2e32ef13d66be0b28d76f6/wicket-js-addons-core/src/main/java/de/alpharogroup/wicket/js/addon/core/StringTextValue.java#L164-L169 |
149,449 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/metadata/StoredProcedure.java | StoredProcedure.equalsNull | private boolean equalsNull(String value1, String value2) {
return (value1 == value2 || value1 == null || (value1 != null && value1.equalsIgnoreCase(value2)));
} | java | private boolean equalsNull(String value1, String value2) {
return (value1 == value2 || value1 == null || (value1 != null && value1.equalsIgnoreCase(value2)));
} | [
"private",
"boolean",
"equalsNull",
"(",
"String",
"value1",
",",
"String",
"value2",
")",
"{",
"return",
"(",
"value1",
"==",
"value2",
"||",
"value1",
"==",
"null",
"||",
"(",
"value1",
"!=",
"null",
"&&",
"value1",
".",
"equalsIgnoreCase",
"(",
"value2"... | Compares two values. Treats null as equal and is case insensitive
@param value1 First value to compare
@param value2 Second value to compare
@return true if two values equals | [
"Compares",
"two",
"values",
".",
"Treats",
"null",
"as",
"equal",
"and",
"is",
"case",
"insensitive"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/metadata/StoredProcedure.java#L126-L128 |
149,450 | javagl/Common | src/main/java/de/javagl/common/beans/PropertyChangeListeners.java | PropertyChangeListeners.addDeepLogger | public static void addDeepLogger(Object object, Level level)
{
addDeepLogger(object, m -> logger.log(level, m));
} | java | public static void addDeepLogger(Object object, Level level)
{
addDeepLogger(object, m -> logger.log(level, m));
} | [
"public",
"static",
"void",
"addDeepLogger",
"(",
"Object",
"object",
",",
"Level",
"level",
")",
"{",
"addDeepLogger",
"(",
"object",
",",
"m",
"->",
"logger",
".",
"log",
"(",
"level",
",",
"m",
")",
")",
";",
"}"
] | Attaches a deep property change listener to the given object, that
generates logging information about the property change events,
and prints them as log messages.
@param object The object
@param level The log level | [
"Attaches",
"a",
"deep",
"property",
"change",
"listener",
"to",
"the",
"given",
"object",
"that",
"generates",
"logging",
"information",
"about",
"the",
"property",
"change",
"events",
"and",
"prints",
"them",
"as",
"log",
"messages",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/PropertyChangeListeners.java#L71-L74 |
149,451 | javagl/Common | src/main/java/de/javagl/common/beans/PropertyChangeListeners.java | PropertyChangeListeners.addDeepConsoleLogger | public static void addDeepConsoleLogger(Object object)
{
addDeepLogger(object, m -> System.out.println(m));
} | java | public static void addDeepConsoleLogger(Object object)
{
addDeepLogger(object, m -> System.out.println(m));
} | [
"public",
"static",
"void",
"addDeepConsoleLogger",
"(",
"Object",
"object",
")",
"{",
"addDeepLogger",
"(",
"object",
",",
"m",
"->",
"System",
".",
"out",
".",
"println",
"(",
"m",
")",
")",
";",
"}"
] | Attaches a deep property change listener to the given object, that
generates logging information about the property change events,
and prints them to the standard output.
@param object The object | [
"Attaches",
"a",
"deep",
"property",
"change",
"listener",
"to",
"the",
"given",
"object",
"that",
"generates",
"logging",
"information",
"about",
"the",
"property",
"change",
"events",
"and",
"prints",
"them",
"to",
"the",
"standard",
"output",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/PropertyChangeListeners.java#L83-L86 |
149,452 | javagl/Common | src/main/java/de/javagl/common/beans/PropertyChangeListeners.java | PropertyChangeListeners.addDeepLogger | public static void addDeepLogger(
Object object, Consumer<? super String> consumer)
{
Objects.requireNonNull(consumer, "The consumer may not be null");
PropertyChangeListener propertyChangeListener =
new PropertyChangeListener()
{
@Override
... | java | public static void addDeepLogger(
Object object, Consumer<? super String> consumer)
{
Objects.requireNonNull(consumer, "The consumer may not be null");
PropertyChangeListener propertyChangeListener =
new PropertyChangeListener()
{
@Override
... | [
"public",
"static",
"void",
"addDeepLogger",
"(",
"Object",
"object",
",",
"Consumer",
"<",
"?",
"super",
"String",
">",
"consumer",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"consumer",
",",
"\"The consumer may not be null\"",
")",
";",
"PropertyChangeList... | Attaches a deep property change listener to the given object, that
generates logging information about the property change events,
and passes them to the given consumer.
@param object The object
@param consumer The log message consumer. May not be <code>null</code>. | [
"Attaches",
"a",
"deep",
"property",
"change",
"listener",
"to",
"the",
"given",
"object",
"that",
"generates",
"logging",
"information",
"about",
"the",
"property",
"change",
"events",
"and",
"passes",
"them",
"to",
"the",
"given",
"consumer",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/PropertyChangeListeners.java#L96-L119 |
149,453 | javagl/Common | src/main/java/de/javagl/common/beans/PropertyChangeListeners.java | PropertyChangeListeners.createLoggingString | private static String createLoggingString(Object object)
{
if (object == null)
{
return "null";
}
Class<? extends Object> objectClass = object.getClass();
if (!objectClass.isArray())
{
return String.valueOf(object);
}
... | java | private static String createLoggingString(Object object)
{
if (object == null)
{
return "null";
}
Class<? extends Object> objectClass = object.getClass();
if (!objectClass.isArray())
{
return String.valueOf(object);
}
... | [
"private",
"static",
"String",
"createLoggingString",
"(",
"Object",
"object",
")",
"{",
"if",
"(",
"object",
"==",
"null",
")",
"{",
"return",
"\"null\"",
";",
"}",
"Class",
"<",
"?",
"extends",
"Object",
">",
"objectClass",
"=",
"object",
".",
"getClass"... | Create a string suitable for logging the given object
@param object The object
@return The string | [
"Create",
"a",
"string",
"suitable",
"for",
"logging",
"the",
"given",
"object"
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/PropertyChangeListeners.java#L127-L152 |
149,454 | javagl/Common | src/main/java/de/javagl/common/beans/PropertyChangeListeners.java | PropertyChangeListeners.removeDeepPropertyChangeListener | public static void removeDeepPropertyChangeListener(
Object object, PropertyChangeListener propertyChangeListener)
{
Objects.requireNonNull(object, "The object may not be null");
Objects.requireNonNull(propertyChangeListener,
"The propertyChangeListener may not be null");
... | java | public static void removeDeepPropertyChangeListener(
Object object, PropertyChangeListener propertyChangeListener)
{
Objects.requireNonNull(object, "The object may not be null");
Objects.requireNonNull(propertyChangeListener,
"The propertyChangeListener may not be null");
... | [
"public",
"static",
"void",
"removeDeepPropertyChangeListener",
"(",
"Object",
"object",
",",
"PropertyChangeListener",
"propertyChangeListener",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"object",
",",
"\"The object may not be null\"",
")",
";",
"Objects",
".",
... | Remove the given property change listener from the given object
and all its sub-objects.
@param object The object
@param propertyChangeListener The property change listener | [
"Remove",
"the",
"given",
"property",
"change",
"listener",
"from",
"the",
"given",
"object",
"and",
"all",
"its",
"sub",
"-",
"objects",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/PropertyChangeListeners.java#L273-L280 |
149,455 | javagl/Common | src/main/java/de/javagl/common/beans/PropertyChangeListeners.java | PropertyChangeListeners.removeRecursive | private static void removeRecursive(
Object object, PropertyChangeListener propertyChangeListener)
{
removeRecursive(object, propertyChangeListener,
new LinkedHashSet<Object>());
} | java | private static void removeRecursive(
Object object, PropertyChangeListener propertyChangeListener)
{
removeRecursive(object, propertyChangeListener,
new LinkedHashSet<Object>());
} | [
"private",
"static",
"void",
"removeRecursive",
"(",
"Object",
"object",
",",
"PropertyChangeListener",
"propertyChangeListener",
")",
"{",
"removeRecursive",
"(",
"object",
",",
"propertyChangeListener",
",",
"new",
"LinkedHashSet",
"<",
"Object",
">",
"(",
")",
")... | Recursively remove the given property change listener from the given
object and all its sub-objects
@param object The object
@param propertyChangeListener The property change listener | [
"Recursively",
"remove",
"the",
"given",
"property",
"change",
"listener",
"from",
"the",
"given",
"object",
"and",
"all",
"its",
"sub",
"-",
"objects"
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/beans/PropertyChangeListeners.java#L350-L355 |
149,456 | greese/dasein-util | src/main/java/org/dasein/util/Translator.java | Translator.copy | public Translator<T> copy() {
Translator<T> trans = new Translator<T>();
if( isBundleBased() ) {
for( Translation<T> t : values() ) {
Locale loc = t.getLocale();
trans.store(loc, t.getData());
}
}
else {
... | java | public Translator<T> copy() {
Translator<T> trans = new Translator<T>();
if( isBundleBased() ) {
for( Translation<T> t : values() ) {
Locale loc = t.getLocale();
trans.store(loc, t.getData());
}
}
else {
... | [
"public",
"Translator",
"<",
"T",
">",
"copy",
"(",
")",
"{",
"Translator",
"<",
"T",
">",
"trans",
"=",
"new",
"Translator",
"<",
"T",
">",
"(",
")",
";",
"if",
"(",
"isBundleBased",
"(",
")",
")",
"{",
"for",
"(",
"Translation",
"<",
"T",
">",
... | Copies the current translator into a new translator object. Even if this translator is resource bundle based,
the copy will not be.
@return a copy of the current translator | [
"Copies",
"the",
"current",
"translator",
"into",
"a",
"new",
"translator",
"object",
".",
"Even",
"if",
"this",
"translator",
"is",
"resource",
"bundle",
"based",
"the",
"copy",
"will",
"not",
"be",
"."
] | 648606dcb4bd382e3287a6c897a32e65d553dc47 | https://github.com/greese/dasein-util/blob/648606dcb4bd382e3287a6c897a32e65d553dc47/src/main/java/org/dasein/util/Translator.java#L198-L218 |
149,457 | ahome-it/lienzo-charts | src/main/java/com/ait/lienzo/charts/client/core/xy/label/XYChartLabelFormatter.java | XYChartLabelFormatter.cut | private void cut(XYChartLabel label, double maxWidth, double maxHeight, double rotation)
{
String text = label.getLabel().getText();
// Cut text.
cutLabelText(label, maxWidth - 5, maxHeight - 5, rotation);
String cutText = label.getLabel().getText();
// If text is cut, add... | java | private void cut(XYChartLabel label, double maxWidth, double maxHeight, double rotation)
{
String text = label.getLabel().getText();
// Cut text.
cutLabelText(label, maxWidth - 5, maxHeight - 5, rotation);
String cutText = label.getLabel().getText();
// If text is cut, add... | [
"private",
"void",
"cut",
"(",
"XYChartLabel",
"label",
",",
"double",
"maxWidth",
",",
"double",
"maxHeight",
",",
"double",
"rotation",
")",
"{",
"String",
"text",
"=",
"label",
".",
"getLabel",
"(",
")",
".",
"getText",
"(",
")",
";",
"// Cut text.",
... | Formats the label Text shapes in the given axis by cutting text value. | [
"Formats",
"the",
"label",
"Text",
"shapes",
"in",
"the",
"given",
"axis",
"by",
"cutting",
"text",
"value",
"."
] | 4237150a5758265eb19ce5b45e50b54fe0168616 | https://github.com/ahome-it/lienzo-charts/blob/4237150a5758265eb19ce5b45e50b54fe0168616/src/main/java/com/ait/lienzo/charts/client/core/xy/label/XYChartLabelFormatter.java#L84-L103 |
149,458 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/profiler/ProfilerFactory.java | ProfilerFactory.newInstance | public static Object newInstance(Object obj) {
if (MjdbcLogger.isSLF4jAvailable() == true && MjdbcLogger.isSLF4jImplementationAvailable() == false) {
// Logging depends on slf4j. If it haven't found any logging system
// connected - it is turned off.
// In such case there is... | java | public static Object newInstance(Object obj) {
if (MjdbcLogger.isSLF4jAvailable() == true && MjdbcLogger.isSLF4jImplementationAvailable() == false) {
// Logging depends on slf4j. If it haven't found any logging system
// connected - it is turned off.
// In such case there is... | [
"public",
"static",
"Object",
"newInstance",
"(",
"Object",
"obj",
")",
"{",
"if",
"(",
"MjdbcLogger",
".",
"isSLF4jAvailable",
"(",
")",
"==",
"true",
"&&",
"MjdbcLogger",
".",
"isSLF4jImplementationAvailable",
"(",
")",
"==",
"false",
")",
"{",
"// Logging d... | Function wraps Object into Profiling Java Proxy.
Used to wrap QueryRunner instance with Java Proxy
@param obj Object which would be wrapped into Profiling Proxy
@return Java Proxy with wrapped input object | [
"Function",
"wraps",
"Object",
"into",
"Profiling",
"Java",
"Proxy",
".",
"Used",
"to",
"wrap",
"QueryRunner",
"instance",
"with",
"Java",
"Proxy"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/profiler/ProfilerFactory.java#L36-L52 |
149,459 | Viascom/groundwork | foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/FoxHttpRequest.java | FoxHttpRequest.execute | public FoxHttpResponse execute(FoxHttpClient foxHttpClient) throws FoxHttpException {
verifyRequest();
foxHttpClient.getFoxHttpLogger().log("========= Request =========");
foxHttpClient.getFoxHttpLogger().log("setFoxHttpClient(" + foxHttpClient + ")");
this.foxHttpClient = foxHttpClient;... | java | public FoxHttpResponse execute(FoxHttpClient foxHttpClient) throws FoxHttpException {
verifyRequest();
foxHttpClient.getFoxHttpLogger().log("========= Request =========");
foxHttpClient.getFoxHttpLogger().log("setFoxHttpClient(" + foxHttpClient + ")");
this.foxHttpClient = foxHttpClient;... | [
"public",
"FoxHttpResponse",
"execute",
"(",
"FoxHttpClient",
"foxHttpClient",
")",
"throws",
"FoxHttpException",
"{",
"verifyRequest",
"(",
")",
";",
"foxHttpClient",
".",
"getFoxHttpLogger",
"(",
")",
".",
"log",
"(",
"\"========= Request =========\"",
")",
";",
"... | Execute a this request
@param foxHttpClient a specific client which will be used for this request
@return Response if this request
@throws FoxHttpException | [
"Execute",
"a",
"this",
"request"
] | d3f7d0df65e2e75861fc7db938090683f2cdf919 | https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/FoxHttpRequest.java#L114-L121 |
149,460 | lightblueseas/wicket-js-addons | wicket-toastr/src/main/java/de/alpharogroup/wicket/js/addon/toastr/ToastJsGenerator.java | ToastJsGenerator.getCommand | public String getCommand(final ToastrSettings settings)
{
final StringBuilder sb = new StringBuilder();
sb.append("toastr.");
sb.append(settings.getToastrType().getValue().getValue());
sb.append("('");
sb.append(settings.getNotificationContent().getValue());
sb.append("'");
if (StringUtils.isNotE... | java | public String getCommand(final ToastrSettings settings)
{
final StringBuilder sb = new StringBuilder();
sb.append("toastr.");
sb.append(settings.getToastrType().getValue().getValue());
sb.append("('");
sb.append(settings.getNotificationContent().getValue());
sb.append("'");
if (StringUtils.isNotE... | [
"public",
"String",
"getCommand",
"(",
"final",
"ToastrSettings",
"settings",
")",
"{",
"final",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"sb",
".",
"append",
"(",
"\"toastr.\"",
")",
";",
"sb",
".",
"append",
"(",
"settings",
"."... | Gets the command.
@param settings
the toastrSettings
@return the command | [
"Gets",
"the",
"command",
"."
] | b1c88c1abafd1e965f2e32ef13d66be0b28d76f6 | https://github.com/lightblueseas/wicket-js-addons/blob/b1c88c1abafd1e965f2e32ef13d66be0b28d76f6/wicket-toastr/src/main/java/de/alpharogroup/wicket/js/addon/toastr/ToastJsGenerator.java#L131-L147 |
149,461 | RogerParkinson/madura-workflows | madura-workflow-vaadin/src/main/java/nz/co/senanque/workflowui/conf/QueueProcessManager.java | QueueProcessManager.getVisibleQueues | public Set<String> getVisibleQueues(PermissionManager permissionManager) {
Set<String> ret = new HashSet<String>();
for (QueueDefinition queueDefinition: m_queues) {
if (permissionManager.hasPermission(FixedPermissions.ADMIN)) {
ret.add(queueDefinition.getName());
continue;
}
if (!ret.contains(queu... | java | public Set<String> getVisibleQueues(PermissionManager permissionManager) {
Set<String> ret = new HashSet<String>();
for (QueueDefinition queueDefinition: m_queues) {
if (permissionManager.hasPermission(FixedPermissions.ADMIN)) {
ret.add(queueDefinition.getName());
continue;
}
if (!ret.contains(queu... | [
"public",
"Set",
"<",
"String",
">",
"getVisibleQueues",
"(",
"PermissionManager",
"permissionManager",
")",
"{",
"Set",
"<",
"String",
">",
"ret",
"=",
"new",
"HashSet",
"<",
"String",
">",
"(",
")",
";",
"for",
"(",
"QueueDefinition",
"queueDefinition",
":... | Get the list of queues visible to this user ie to the user with the permissions
defined in the given permissions manager. ADMIN permission means all are visible.
@param permissionManager
@return list of queue names. | [
"Get",
"the",
"list",
"of",
"queues",
"visible",
"to",
"this",
"user",
"ie",
"to",
"the",
"user",
"with",
"the",
"permissions",
"defined",
"in",
"the",
"given",
"permissions",
"manager",
".",
"ADMIN",
"permission",
"means",
"all",
"are",
"visible",
"."
] | 3d26c322fc85a006ff0d0cbebacbc453aed8e492 | https://github.com/RogerParkinson/madura-workflows/blob/3d26c322fc85a006ff0d0cbebacbc453aed8e492/madura-workflow-vaadin/src/main/java/nz/co/senanque/workflowui/conf/QueueProcessManager.java#L70-L85 |
149,462 | RogerParkinson/madura-workflows | madura-workflow-vaadin/src/main/java/nz/co/senanque/workflowui/conf/QueueProcessManager.java | QueueProcessManager.getQueueFilter | public Filter getQueueFilter(PermissionManager permissionManager) {
if (permissionManager.hasPermission(FixedPermissions.TECHSUPPORT) || permissionManager.hasPermission(FixedPermissions.ADMIN)) {
return null;
}
Set<String> visibleQueues = getVisibleQueues(permissionManager);
Filter filters[] = new Filter[vis... | java | public Filter getQueueFilter(PermissionManager permissionManager) {
if (permissionManager.hasPermission(FixedPermissions.TECHSUPPORT) || permissionManager.hasPermission(FixedPermissions.ADMIN)) {
return null;
}
Set<String> visibleQueues = getVisibleQueues(permissionManager);
Filter filters[] = new Filter[vis... | [
"public",
"Filter",
"getQueueFilter",
"(",
"PermissionManager",
"permissionManager",
")",
"{",
"if",
"(",
"permissionManager",
".",
"hasPermission",
"(",
"FixedPermissions",
".",
"TECHSUPPORT",
")",
"||",
"permissionManager",
".",
"hasPermission",
"(",
"FixedPermissions... | If we have the TECHSUPPORT or ADMIN permission then return null. Those users can see everything so no filter required.
For the rest we only display queues they have permission to see and only processes in WAIT status.
@param permissionManager
@return filter | [
"If",
"we",
"have",
"the",
"TECHSUPPORT",
"or",
"ADMIN",
"permission",
"then",
"return",
"null",
".",
"Those",
"users",
"can",
"see",
"everything",
"so",
"no",
"filter",
"required",
".",
"For",
"the",
"rest",
"we",
"only",
"display",
"queues",
"they",
"hav... | 3d26c322fc85a006ff0d0cbebacbc453aed8e492 | https://github.com/RogerParkinson/madura-workflows/blob/3d26c322fc85a006ff0d0cbebacbc453aed8e492/madura-workflow-vaadin/src/main/java/nz/co/senanque/workflowui/conf/QueueProcessManager.java#L114-L133 |
149,463 | RogerParkinson/madura-workflows | madura-workflow-vaadin/src/main/java/nz/co/senanque/workflowui/conf/QueueProcessManager.java | QueueProcessManager.getVisibleProcesses | public Set<ProcessDefinition> getVisibleProcesses(PermissionManager permissionManager) {
Set<ProcessDefinition> ret = new HashSet<>();
Set<String> queues = getWriteableQueues(permissionManager);
String lastProcessName = "";
for (ProcessDefinition processDefinition: m_processes) {
String processName = process... | java | public Set<ProcessDefinition> getVisibleProcesses(PermissionManager permissionManager) {
Set<ProcessDefinition> ret = new HashSet<>();
Set<String> queues = getWriteableQueues(permissionManager);
String lastProcessName = "";
for (ProcessDefinition processDefinition: m_processes) {
String processName = process... | [
"public",
"Set",
"<",
"ProcessDefinition",
">",
"getVisibleProcesses",
"(",
"PermissionManager",
"permissionManager",
")",
"{",
"Set",
"<",
"ProcessDefinition",
">",
"ret",
"=",
"new",
"HashSet",
"<>",
"(",
")",
";",
"Set",
"<",
"String",
">",
"queues",
"=",
... | Get the list of queues visible to this user ie to the user with the permissions
defined in the given permissions manager,
@param permissionManager
@return | [
"Get",
"the",
"list",
"of",
"queues",
"visible",
"to",
"this",
"user",
"ie",
"to",
"the",
"user",
"with",
"the",
"permissions",
"defined",
"in",
"the",
"given",
"permissions",
"manager"
] | 3d26c322fc85a006ff0d0cbebacbc453aed8e492 | https://github.com/RogerParkinson/madura-workflows/blob/3d26c322fc85a006ff0d0cbebacbc453aed8e492/madura-workflow-vaadin/src/main/java/nz/co/senanque/workflowui/conf/QueueProcessManager.java#L141-L160 |
149,464 | greese/dasein-util | src/main/java/org/dasein/attributes/types/BooleanFactory.java | BooleanFactory.getType | public DataType<Boolean> getType(String grp, Number idx, boolean ml, boolean mv, boolean req, String... params) {
return new BooleanAttribute(grp, idx, ml, mv, req);
} | java | public DataType<Boolean> getType(String grp, Number idx, boolean ml, boolean mv, boolean req, String... params) {
return new BooleanAttribute(grp, idx, ml, mv, req);
} | [
"public",
"DataType",
"<",
"Boolean",
">",
"getType",
"(",
"String",
"grp",
",",
"Number",
"idx",
",",
"boolean",
"ml",
",",
"boolean",
"mv",
",",
"boolean",
"req",
",",
"String",
"...",
"params",
")",
"{",
"return",
"new",
"BooleanAttribute",
"(",
"grp"... | Technically, you can have a multi-lingual or multi-valued boolean, but why would you?
@param ml true if the boolean is multi-lingual
@param mv true if the boolean can support multiple values
@param req true if the boolean is required
@param params unused
@return a boolean instance | [
"Technically",
"you",
"can",
"have",
"a",
"multi",
"-",
"lingual",
"or",
"multi",
"-",
"valued",
"boolean",
"but",
"why",
"would",
"you?"
] | 648606dcb4bd382e3287a6c897a32e65d553dc47 | https://github.com/greese/dasein-util/blob/648606dcb4bd382e3287a6c897a32e65d553dc47/src/main/java/org/dasein/attributes/types/BooleanFactory.java#L94-L96 |
149,465 | workplacesystems/queuj | src/main/java/com/workplacesystems/queuj/utils/BackgroundProcess.java | BackgroundProcess.joinThread | public void joinThread(long timeout)
{
// take local ref copy, so can reliably check if ref is null,
Thread local_thread_ref = thread;
if (local_thread_ref != null)
{
try
{
long millis = 0l;
if (log.isDebugEnabled())
... | java | public void joinThread(long timeout)
{
// take local ref copy, so can reliably check if ref is null,
Thread local_thread_ref = thread;
if (local_thread_ref != null)
{
try
{
long millis = 0l;
if (log.isDebugEnabled())
... | [
"public",
"void",
"joinThread",
"(",
"long",
"timeout",
")",
"{",
"// take local ref copy, so can reliably check if ref is null,\r",
"Thread",
"local_thread_ref",
"=",
"thread",
";",
"if",
"(",
"local_thread_ref",
"!=",
"null",
")",
"{",
"try",
"{",
"long",
"millis",
... | Inactivively waits for the process to finish or until timeout occurs,
whichever is earlier. If the process was not running, returns immediatelly.
@param timeout | [
"Inactivively",
"waits",
"for",
"the",
"process",
"to",
"finish",
"or",
"until",
"timeout",
"occurs",
"whichever",
"is",
"earlier",
".",
"If",
"the",
"process",
"was",
"not",
"running",
"returns",
"immediatelly",
"."
] | 4293116b412b4a20ead99963b9b05a135812c501 | https://github.com/workplacesystems/queuj/blob/4293116b412b4a20ead99963b9b05a135812c501/src/main/java/com/workplacesystems/queuj/utils/BackgroundProcess.java#L248-L289 |
149,466 | Viascom/groundwork | foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/header/FoxHttpHeader.java | FoxHttpHeader.addHeader | public void addHeader(Map<String, String> entries) {
for (Map.Entry<String, String> entry : entries.entrySet()) {
headerEntries.add(new HeaderEntry(entry.getKey(), entry.getValue()));
}
} | java | public void addHeader(Map<String, String> entries) {
for (Map.Entry<String, String> entry : entries.entrySet()) {
headerEntries.add(new HeaderEntry(entry.getKey(), entry.getValue()));
}
} | [
"public",
"void",
"addHeader",
"(",
"Map",
"<",
"String",
",",
"String",
">",
"entries",
")",
"{",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"String",
">",
"entry",
":",
"entries",
".",
"entrySet",
"(",
")",
")",
"{",
"headerEntries",
".",... | Add a new map of header entries
@param entries map of header entries | [
"Add",
"a",
"new",
"map",
"of",
"header",
"entries"
] | d3f7d0df65e2e75861fc7db938090683f2cdf919 | https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/header/FoxHttpHeader.java#L51-L55 |
149,467 | Viascom/groundwork | foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/header/FoxHttpHeader.java | FoxHttpHeader.getHeader | public HeaderEntry getHeader(String name) {
for (HeaderEntry headerField : getHeaderEntries()) {
if (headerField.getName().equals(name)) {
return headerField;
}
}
return null;
} | java | public HeaderEntry getHeader(String name) {
for (HeaderEntry headerField : getHeaderEntries()) {
if (headerField.getName().equals(name)) {
return headerField;
}
}
return null;
} | [
"public",
"HeaderEntry",
"getHeader",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"HeaderEntry",
"headerField",
":",
"getHeaderEntries",
"(",
")",
")",
"{",
"if",
"(",
"headerField",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"{",
... | Get a specific header based on its name
@param name name of the header
@return a specific header | [
"Get",
"a",
"specific",
"header",
"based",
"on",
"its",
"name"
] | d3f7d0df65e2e75861fc7db938090683f2cdf919 | https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/header/FoxHttpHeader.java#L72-L79 |
149,468 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.propertyDescriptors | public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) {
BeanInfo beanInfo = null;
try {
beanInfo = Introspector.getBeanInfo(clazz);
} catch (IntrospectionException ex) {
throw new IllegalArgumentException(
"Bean introspection f... | java | public static PropertyDescriptor[] propertyDescriptors(Class<?> clazz) {
BeanInfo beanInfo = null;
try {
beanInfo = Introspector.getBeanInfo(clazz);
} catch (IntrospectionException ex) {
throw new IllegalArgumentException(
"Bean introspection f... | [
"public",
"static",
"PropertyDescriptor",
"[",
"]",
"propertyDescriptors",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"BeanInfo",
"beanInfo",
"=",
"null",
";",
"try",
"{",
"beanInfo",
"=",
"Introspector",
".",
"getBeanInfo",
"(",
"clazz",
")",
";",
"}... | Reads property descriptors of class
@param clazz Class for which we are getting property descriptors
@return Array of Class PropertyDescriptors | [
"Reads",
"property",
"descriptors",
"of",
"class"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L80-L91 |
149,469 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.mapPropertyDescriptors | public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) {
PropertyDescriptor[] properties = propertyDescriptors(clazz);
Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>();
for (PropertyDescriptor property : properties) {... | java | public static Map<String, PropertyDescriptor> mapPropertyDescriptors(Class<?> clazz) {
PropertyDescriptor[] properties = propertyDescriptors(clazz);
Map<String, PropertyDescriptor> mappedProperties = new HashMap<String, PropertyDescriptor>();
for (PropertyDescriptor property : properties) {... | [
"public",
"static",
"Map",
"<",
"String",
",",
"PropertyDescriptor",
">",
"mapPropertyDescriptors",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"PropertyDescriptor",
"[",
"]",
"properties",
"=",
"propertyDescriptors",
"(",
"clazz",
")",
";",
"Map",
"<",
... | Reads property descriptors of class and puts them into Map.
Key for map is read from property descriptor.
@param clazz Class for which Property Descriptors would be read
@return Map of Property Descriptors for specified class | [
"Reads",
"property",
"descriptors",
"of",
"class",
"and",
"puts",
"them",
"into",
"Map",
".",
"Key",
"for",
"map",
"is",
"read",
"from",
"property",
"descriptor",
"."
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L100-L111 |
149,470 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.callGetter | public static Object callGetter(Object target, PropertyDescriptor prop) {
Object result = null;
Method getter = prop.getReadMethod();
if (getter == null) {
throw new RuntimeException("No read method for bean property "
+ target.getClass() + " " + prop.get... | java | public static Object callGetter(Object target, PropertyDescriptor prop) {
Object result = null;
Method getter = prop.getReadMethod();
if (getter == null) {
throw new RuntimeException("No read method for bean property "
+ target.getClass() + " " + prop.get... | [
"public",
"static",
"Object",
"callGetter",
"(",
"Object",
"target",
",",
"PropertyDescriptor",
"prop",
")",
"{",
"Object",
"result",
"=",
"null",
";",
"Method",
"getter",
"=",
"prop",
".",
"getReadMethod",
"(",
")",
";",
"if",
"(",
"getter",
"==",
"null",... | Invokes Property Descriptor Getter and returns value returned by that function.
@param target Object Getter of which would be executed
@param prop Property Descriptor which would be used to invoke Getter
@return Value returned from Getter | [
"Invokes",
"Property",
"Descriptor",
"Getter",
"and",
"returns",
"value",
"returned",
"by",
"that",
"function",
"."
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L120-L143 |
149,471 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.convertResultSet | public static List<QueryParameters> convertResultSet(ResultSet rs) throws SQLException {
List<QueryParameters> result = new ArrayList<QueryParameters>();
String columnName = null;
while (rs.next() == true) {
QueryParameters params = new QueryParameters();
ResultSet... | java | public static List<QueryParameters> convertResultSet(ResultSet rs) throws SQLException {
List<QueryParameters> result = new ArrayList<QueryParameters>();
String columnName = null;
while (rs.next() == true) {
QueryParameters params = new QueryParameters();
ResultSet... | [
"public",
"static",
"List",
"<",
"QueryParameters",
">",
"convertResultSet",
"(",
"ResultSet",
"rs",
")",
"throws",
"SQLException",
"{",
"List",
"<",
"QueryParameters",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"QueryParameters",
">",
"(",
")",
";",
"String... | Converts java.sql.ResultSet into List of QueryParameters.
Used for caching purposes to allow ResultSet to be closed and disposed.
@param rs ResultSet values from which would be read
@return List of QueryParameters (one for each row)
@throws SQLException propagates SQLException sent from ResultSet | [
"Converts",
"java",
".",
"sql",
".",
"ResultSet",
"into",
"List",
"of",
"QueryParameters",
".",
"Used",
"for",
"caching",
"purposes",
"to",
"allow",
"ResultSet",
"to",
"be",
"closed",
"and",
"disposed",
"."
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L185-L209 |
149,472 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.newInstance | public static <T> T newInstance(Class<T> clazz) throws MjdbcException {
try {
return clazz.newInstance();
} catch (InstantiationException ex) {
throw new MjdbcException(
"Failed to create instance: " + clazz.getName() + " - " + ex.getMessage());
... | java | public static <T> T newInstance(Class<T> clazz) throws MjdbcException {
try {
return clazz.newInstance();
} catch (InstantiationException ex) {
throw new MjdbcException(
"Failed to create instance: " + clazz.getName() + " - " + ex.getMessage());
... | [
"public",
"static",
"<",
"T",
">",
"T",
"newInstance",
"(",
"Class",
"<",
"T",
">",
"clazz",
")",
"throws",
"MjdbcException",
"{",
"try",
"{",
"return",
"clazz",
".",
"newInstance",
"(",
")",
";",
"}",
"catch",
"(",
"InstantiationException",
"ex",
")",
... | Creates new Instance of class specified.
Default Constructor should be visible in order to create new Instance
@param clazz Class which should be instantiated
@return Empty Object
@throws SQLException in case of instantiation error | [
"Creates",
"new",
"Instance",
"of",
"class",
"specified",
".",
"Default",
"Constructor",
"should",
"be",
"visible",
"in",
"order",
"to",
"create",
"new",
"Instance"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L219-L231 |
149,473 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.hasFunction | public static boolean hasFunction(Object object, String functionName, Class[] parameters) {
boolean result = false;
try {
Method method = object.getClass().getMethod(functionName, parameters);
if (method != null) {
result = true;
}
}... | java | public static boolean hasFunction(Object object, String functionName, Class[] parameters) {
boolean result = false;
try {
Method method = object.getClass().getMethod(functionName, parameters);
if (method != null) {
result = true;
}
}... | [
"public",
"static",
"boolean",
"hasFunction",
"(",
"Object",
"object",
",",
"String",
"functionName",
",",
"Class",
"[",
"]",
"parameters",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"try",
"{",
"Method",
"method",
"=",
"object",
".",
"getClass",
"(... | Checks if Instance has specified function
@param object Instance which function would be checked
@param functionName function name
@param parameters function parameters (array of Class)
@return true if function is present in Instance | [
"Checks",
"if",
"Instance",
"has",
"specified",
"function"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L307-L321 |
149,474 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.objectInstanceOf | public static boolean objectInstanceOf(Object object, String className) {
AssertUtils.assertNotNull(object);
boolean result = false;
Class clazz = object.getClass();
if (clazz.getName().equals(className) == true) {
result = true;
}
return result... | java | public static boolean objectInstanceOf(Object object, String className) {
AssertUtils.assertNotNull(object);
boolean result = false;
Class clazz = object.getClass();
if (clazz.getName().equals(className) == true) {
result = true;
}
return result... | [
"public",
"static",
"boolean",
"objectInstanceOf",
"(",
"Object",
"object",
",",
"String",
"className",
")",
"{",
"AssertUtils",
".",
"assertNotNull",
"(",
"object",
")",
";",
"boolean",
"result",
"=",
"false",
";",
"Class",
"clazz",
"=",
"object",
".",
"get... | Checks if instance is of specified class
@param object Instance which would be checked
@param className Class name with which it would be checked
@return true if Instance is of specified class | [
"Checks",
"if",
"instance",
"is",
"of",
"specified",
"class"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L378-L390 |
149,475 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.objectAssignableTo | public static boolean objectAssignableTo(Object object, String className) throws MjdbcException {
AssertUtils.assertNotNull(object);
boolean result = false;
Class clazz = null;
try {
clazz = Class.forName(className);
} catch (ClassNotFoundException ex) {
... | java | public static boolean objectAssignableTo(Object object, String className) throws MjdbcException {
AssertUtils.assertNotNull(object);
boolean result = false;
Class clazz = null;
try {
clazz = Class.forName(className);
} catch (ClassNotFoundException ex) {
... | [
"public",
"static",
"boolean",
"objectAssignableTo",
"(",
"Object",
"object",
",",
"String",
"className",
")",
"throws",
"MjdbcException",
"{",
"AssertUtils",
".",
"assertNotNull",
"(",
"object",
")",
";",
"boolean",
"result",
"=",
"false",
";",
"Class",
"clazz"... | Checks if instance can be cast to specified Class
@param object Instance which would be checked
@param className Class name with which it would be checked
@return true if Instance can be cast to specified class
@throws org.midao.jdbc.core.exception.MjdbcException | [
"Checks",
"if",
"instance",
"can",
"be",
"cast",
"to",
"specified",
"Class"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L400-L415 |
149,476 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.returnStaticField | public static Object returnStaticField(Class clazz, String fieldName) throws MjdbcException {
Object result = null;
Field field = null;
try {
field = clazz.getField(fieldName);
result = field.get(null);
} catch (NoSuchFieldException ex) {
thro... | java | public static Object returnStaticField(Class clazz, String fieldName) throws MjdbcException {
Object result = null;
Field field = null;
try {
field = clazz.getField(fieldName);
result = field.get(null);
} catch (NoSuchFieldException ex) {
thro... | [
"public",
"static",
"Object",
"returnStaticField",
"(",
"Class",
"clazz",
",",
"String",
"fieldName",
")",
"throws",
"MjdbcException",
"{",
"Object",
"result",
"=",
"null",
";",
"Field",
"field",
"=",
"null",
";",
"try",
"{",
"field",
"=",
"clazz",
".",
"g... | Returns class static field value
Is used to return Constants
@param clazz Class static field of which would be returned
@param fieldName field name
@return field value
@throws org.midao.jdbc.core.exception.MjdbcException if field is not present or access is prohibited | [
"Returns",
"class",
"static",
"field",
"value",
"Is",
"used",
"to",
"return",
"Constants"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L426-L440 |
149,477 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.returnField | public static Object returnField(Object object, String fieldName) throws MjdbcException {
AssertUtils.assertNotNull(object);
Object result = null;
Field field = null;
try {
field = object.getClass().getField(fieldName);
result = field.get(object);
... | java | public static Object returnField(Object object, String fieldName) throws MjdbcException {
AssertUtils.assertNotNull(object);
Object result = null;
Field field = null;
try {
field = object.getClass().getField(fieldName);
result = field.get(object);
... | [
"public",
"static",
"Object",
"returnField",
"(",
"Object",
"object",
",",
"String",
"fieldName",
")",
"throws",
"MjdbcException",
"{",
"AssertUtils",
".",
"assertNotNull",
"(",
"object",
")",
";",
"Object",
"result",
"=",
"null",
";",
"Field",
"field",
"=",
... | Returns class field value
Is used to return Constants
@param object Class field of which would be returned
@param fieldName field name
@return field value
@throws org.midao.jdbc.core.exception.MjdbcException if field is not present or access is prohibited | [
"Returns",
"class",
"field",
"value",
"Is",
"used",
"to",
"return",
"Constants"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L451-L467 |
149,478 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java | MappingUtils.isPrimitive | public static boolean isPrimitive(Object value) {
if (value == null) {
return true;
} else if (value.getClass().isPrimitive() == true) {
return true;
} else if (Integer.class.isInstance(value)) {
return true;
} else if (Long.class.isInst... | java | public static boolean isPrimitive(Object value) {
if (value == null) {
return true;
} else if (value.getClass().isPrimitive() == true) {
return true;
} else if (Integer.class.isInstance(value)) {
return true;
} else if (Long.class.isInst... | [
"public",
"static",
"boolean",
"isPrimitive",
"(",
"Object",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"true",
";",
"}",
"else",
"if",
"(",
"value",
".",
"getClass",
"(",
")",
".",
"isPrimitive",
"(",
")",
"==",
"true",... | Checks is value is of Primitive type
@param value value which would be checked
@return true - if value is primitive(or it's wrapper) type | [
"Checks",
"is",
"value",
"is",
"of",
"Primitive",
"type"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/utils/MappingUtils.java#L475-L515 |
149,479 | mike10004/common-helper | native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/Subprocess.java | Subprocess.running | public static Builder running(File executable) {
checkArgument(executable.isFile(), "file not found: %s", executable);
checkArgument(executable.canExecute(), "executable.canExecute");
return running(executable.getPath());
} | java | public static Builder running(File executable) {
checkArgument(executable.isFile(), "file not found: %s", executable);
checkArgument(executable.canExecute(), "executable.canExecute");
return running(executable.getPath());
} | [
"public",
"static",
"Builder",
"running",
"(",
"File",
"executable",
")",
"{",
"checkArgument",
"(",
"executable",
".",
"isFile",
"(",
")",
",",
"\"file not found: %s\"",
",",
"executable",
")",
";",
"checkArgument",
"(",
"executable",
".",
"canExecute",
"(",
... | Constructs a builder instance that will produce a program that
launches the given executable. Checks that a file exists at the given pathname
and that it is executable by the operating system.
@param executable the executable file
@return a builder instance
@throws IllegalArgumentException if {@link File#canExecute() }... | [
"Constructs",
"a",
"builder",
"instance",
"that",
"will",
"produce",
"a",
"program",
"that",
"launches",
"the",
"given",
"executable",
".",
"Checks",
"that",
"a",
"file",
"exists",
"at",
"the",
"given",
"pathname",
"and",
"that",
"it",
"is",
"executable",
"b... | 744f82d9b0768a9ad9c63a57a37ab2c93bf408f4 | https://github.com/mike10004/common-helper/blob/744f82d9b0768a9ad9c63a57a37ab2c93bf408f4/native-helper/src/main/java/com/github/mike10004/nativehelper/subprocess/Subprocess.java#L505-L509 |
149,480 | Viascom/groundwork | foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/annotation/processor/FoxHttpAnnotationParser.java | FoxHttpAnnotationParser.parseInterface | @SuppressWarnings("unchecked")
public <T> T parseInterface(final Class<T> serviceInterface, FoxHttpClient foxHttpClient) throws FoxHttpException {
try {
Method[] methods = serviceInterface.getDeclaredMethods();
for (Method method : methods) {
FoxHttpMethodParser fox... | java | @SuppressWarnings("unchecked")
public <T> T parseInterface(final Class<T> serviceInterface, FoxHttpClient foxHttpClient) throws FoxHttpException {
try {
Method[] methods = serviceInterface.getDeclaredMethods();
for (Method method : methods) {
FoxHttpMethodParser fox... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"public",
"<",
"T",
">",
"T",
"parseInterface",
"(",
"final",
"Class",
"<",
"T",
">",
"serviceInterface",
",",
"FoxHttpClient",
"foxHttpClient",
")",
"throws",
"FoxHttpException",
"{",
"try",
"{",
"Method",
"... | Parse the given interface for the use of FoxHttp
@param serviceInterface interface to parse
@param foxHttpClient FoxHttpClient to use
@param <T> interface class to parse
@return Proxy of the interface
@throws FoxHttpRequestException | [
"Parse",
"the",
"given",
"interface",
"for",
"the",
"use",
"of",
"FoxHttp"
] | d3f7d0df65e2e75861fc7db938090683f2cdf919 | https://github.com/Viascom/groundwork/blob/d3f7d0df65e2e75861fc7db938090683f2cdf919/foxhttp/src/main/java/ch/viascom/groundwork/foxhttp/annotation/processor/FoxHttpAnnotationParser.java#L41-L67 |
149,481 | workplacesystems/queuj | src/main/java/com/workplacesystems/queuj/QueueBuilder.java | QueueBuilder.newQueue | public Queue<B> newQueue()
{
return new Queue<B>(parent_queue, queue_restriction, index, process_builder_class, process_server_class,
default_occurence, default_visibility, default_access, default_resilience, default_output, implementation_options);
} | java | public Queue<B> newQueue()
{
return new Queue<B>(parent_queue, queue_restriction, index, process_builder_class, process_server_class,
default_occurence, default_visibility, default_access, default_resilience, default_output, implementation_options);
} | [
"public",
"Queue",
"<",
"B",
">",
"newQueue",
"(",
")",
"{",
"return",
"new",
"Queue",
"<",
"B",
">",
"(",
"parent_queue",
",",
"queue_restriction",
",",
"index",
",",
"process_builder_class",
",",
"process_server_class",
",",
"default_occurence",
",",
"defaul... | Create the new Queue using the currently set properties. | [
"Create",
"the",
"new",
"Queue",
"using",
"the",
"currently",
"set",
"properties",
"."
] | 4293116b412b4a20ead99963b9b05a135812c501 | https://github.com/workplacesystems/queuj/blob/4293116b412b4a20ead99963b9b05a135812c501/src/main/java/com/workplacesystems/queuj/QueueBuilder.java#L152-L156 |
149,482 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/input/named/AbstractNamedInputHandler.java | AbstractNamedInputHandler.updateBean | protected T updateBean(T object, Map<String, Object> source) {
T clone = copyProperties(object);
updateProperties(clone, source);
return clone;
} | java | protected T updateBean(T object, Map<String, Object> source) {
T clone = copyProperties(object);
updateProperties(clone, source);
return clone;
} | [
"protected",
"T",
"updateBean",
"(",
"T",
"object",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"source",
")",
"{",
"T",
"clone",
"=",
"copyProperties",
"(",
"object",
")",
";",
"updateProperties",
"(",
"clone",
",",
"source",
")",
";",
"return",
"c... | Updates bean with values from source.
@param object Bean object to update
@param source Map which would be read
@return cloned bean with updated values | [
"Updates",
"bean",
"with",
"values",
"from",
"source",
"."
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/input/named/AbstractNamedInputHandler.java#L88-L94 |
149,483 | pryzach/midao | midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/input/named/AbstractNamedInputHandler.java | AbstractNamedInputHandler.createEmpty | private T createEmpty(Class<?> clazz) {
T emptyInstance = null;
if (clazz.isInterface()) {
throw new IllegalArgumentException("Specified class is an interface: " + clazz.getName());
}
try {
emptyInstance = (T) clazz.newInstance();
} catch (InstantiationE... | java | private T createEmpty(Class<?> clazz) {
T emptyInstance = null;
if (clazz.isInterface()) {
throw new IllegalArgumentException("Specified class is an interface: " + clazz.getName());
}
try {
emptyInstance = (T) clazz.newInstance();
} catch (InstantiationE... | [
"private",
"T",
"createEmpty",
"(",
"Class",
"<",
"?",
">",
"clazz",
")",
"{",
"T",
"emptyInstance",
"=",
"null",
";",
"if",
"(",
"clazz",
".",
"isInterface",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Specified class is an inter... | Creates new empty Bean instance
@param clazz Class description which would be instantiated
@return empty Bean instance | [
"Creates",
"new",
"empty",
"Bean",
"instance"
] | ed9048ed2c792a4794a2116a25779dfb84cd9447 | https://github.com/pryzach/midao/blob/ed9048ed2c792a4794a2116a25779dfb84cd9447/midao-jdbc-core/src/main/java/org/midao/jdbc/core/handlers/input/named/AbstractNamedInputHandler.java#L144-L160 |
149,484 | kikinteractive/ice | ice/src/main/java/com/kik/config/ice/ConfigSystem.java | ConfigSystem.configModuleWithOverrides | public static <C> Module configModuleWithOverrides(final Class<C> configInterface, OverrideConsumer<C> overrideConsumer)
{
checkNotNull(configInterface);
checkNotNull(overrideConsumer);
return configModuleWithOverrides(configInterface, Optional.empty(), Optional.ofNullable(overrideConsumer))... | java | public static <C> Module configModuleWithOverrides(final Class<C> configInterface, OverrideConsumer<C> overrideConsumer)
{
checkNotNull(configInterface);
checkNotNull(overrideConsumer);
return configModuleWithOverrides(configInterface, Optional.empty(), Optional.ofNullable(overrideConsumer))... | [
"public",
"static",
"<",
"C",
">",
"Module",
"configModuleWithOverrides",
"(",
"final",
"Class",
"<",
"C",
">",
"configInterface",
",",
"OverrideConsumer",
"<",
"C",
">",
"overrideConsumer",
")",
"{",
"checkNotNull",
"(",
"configInterface",
")",
";",
"checkNotNu... | Generates a Guice Module for use with Injector creation. THe generate Guice module binds a number of support
classes to service a dynamically generate implementation of the provided configuration interface.
This method further overrides the annotated defaults on the configuration class as per the code in
the given over... | [
"Generates",
"a",
"Guice",
"Module",
"for",
"use",
"with",
"Injector",
"creation",
".",
"THe",
"generate",
"Guice",
"module",
"binds",
"a",
"number",
"of",
"support",
"classes",
"to",
"service",
"a",
"dynamically",
"generate",
"implementation",
"of",
"the",
"p... | 0c58d7bf2d9f6504892d0768d6022fcfa6df7514 | https://github.com/kikinteractive/ice/blob/0c58d7bf2d9f6504892d0768d6022fcfa6df7514/ice/src/main/java/com/kik/config/ice/ConfigSystem.java#L107-L112 |
149,485 | kikinteractive/ice | ice/src/main/java/com/kik/config/ice/ConfigSystem.java | ConfigSystem.configModuleWithOverrides | public static <C> Module configModuleWithOverrides(final Class<C> configInterface, Named name, OverrideConsumer<C> overrideConsumer)
{
checkNotNull(configInterface);
checkNotNull(name);
checkNotNull(overrideConsumer);
return configModuleWithOverrides(configInterface, Optional.ofNulla... | java | public static <C> Module configModuleWithOverrides(final Class<C> configInterface, Named name, OverrideConsumer<C> overrideConsumer)
{
checkNotNull(configInterface);
checkNotNull(name);
checkNotNull(overrideConsumer);
return configModuleWithOverrides(configInterface, Optional.ofNulla... | [
"public",
"static",
"<",
"C",
">",
"Module",
"configModuleWithOverrides",
"(",
"final",
"Class",
"<",
"C",
">",
"configInterface",
",",
"Named",
"name",
",",
"OverrideConsumer",
"<",
"C",
">",
"overrideConsumer",
")",
"{",
"checkNotNull",
"(",
"configInterface",... | Generates a Guice Module for use with Injector creation. The generate Guice module binds a number of support
classes to service a dynamically generate implementation of the provided configuration interface.
This method further overrides the annotated defaults on the configuration class as per the code in
the given over... | [
"Generates",
"a",
"Guice",
"Module",
"for",
"use",
"with",
"Injector",
"creation",
".",
"The",
"generate",
"Guice",
"module",
"binds",
"a",
"number",
"of",
"support",
"classes",
"to",
"service",
"a",
"dynamically",
"generate",
"implementation",
"of",
"the",
"p... | 0c58d7bf2d9f6504892d0768d6022fcfa6df7514 | https://github.com/kikinteractive/ice/blob/0c58d7bf2d9f6504892d0768d6022fcfa6df7514/ice/src/main/java/com/kik/config/ice/ConfigSystem.java#L128-L134 |
149,486 | wb14123/bard | bard-core/src/main/java/com/bardframework/bard/core/Util.java | Util.getConfig | public static CompositeConfiguration getConfig() {
if (config == null) {
config = new CompositeConfiguration();
String configFile = "bard.properties";
if (Util.class.getClassLoader().getResource(configFile) == null) {
return config;
}
... | java | public static CompositeConfiguration getConfig() {
if (config == null) {
config = new CompositeConfiguration();
String configFile = "bard.properties";
if (Util.class.getClassLoader().getResource(configFile) == null) {
return config;
}
... | [
"public",
"static",
"CompositeConfiguration",
"getConfig",
"(",
")",
"{",
"if",
"(",
"config",
"==",
"null",
")",
"{",
"config",
"=",
"new",
"CompositeConfiguration",
"(",
")",
";",
"String",
"configFile",
"=",
"\"bard.properties\"",
";",
"if",
"(",
"Util",
... | Get the Bard config object. The properties is set in "bard.properties".
@return The config object. | [
"Get",
"the",
"Bard",
"config",
"object",
".",
"The",
"properties",
"is",
"set",
"in",
"bard",
".",
"properties",
"."
] | 98618ae31fd80000c794661b4c130af1b1298d9b | https://github.com/wb14123/bard/blob/98618ae31fd80000c794661b4c130af1b1298d9b/bard-core/src/main/java/com/bardframework/bard/core/Util.java#L18-L34 |
149,487 | wb14123/bard | bard-util/bard-user/src/main/java/com/bardframework/bard/util/user/PasswordEncrypter.java | PasswordEncrypter.encrypt | public static String[] encrypt(String password) {
SecureRandom random = new SecureRandom();
String salt = new BigInteger(130, random).toString(32);
String encryptPassword = encrypt(password, salt);
return new String[] {encryptPassword, salt};
} | java | public static String[] encrypt(String password) {
SecureRandom random = new SecureRandom();
String salt = new BigInteger(130, random).toString(32);
String encryptPassword = encrypt(password, salt);
return new String[] {encryptPassword, salt};
} | [
"public",
"static",
"String",
"[",
"]",
"encrypt",
"(",
"String",
"password",
")",
"{",
"SecureRandom",
"random",
"=",
"new",
"SecureRandom",
"(",
")",
";",
"String",
"salt",
"=",
"new",
"BigInteger",
"(",
"130",
",",
"random",
")",
".",
"toString",
"(",... | Encrypt a password string with a random generated salt.
@param password The origin password need to be encrypt.
@return An array with two elements: The first one is the encrypted password and the second one is the salt. | [
"Encrypt",
"a",
"password",
"string",
"with",
"a",
"random",
"generated",
"salt",
"."
] | 98618ae31fd80000c794661b4c130af1b1298d9b | https://github.com/wb14123/bard/blob/98618ae31fd80000c794661b4c130af1b1298d9b/bard-util/bard-user/src/main/java/com/bardframework/bard/util/user/PasswordEncrypter.java#L15-L20 |
149,488 | wb14123/bard | bard-util/bard-user/src/main/java/com/bardframework/bard/util/user/PasswordEncrypter.java | PasswordEncrypter.encrypt | public static String encrypt(String password, String salt) {
String saltPassword = password + salt;
return DigestUtils.sha256Hex(saltPassword.getBytes());
} | java | public static String encrypt(String password, String salt) {
String saltPassword = password + salt;
return DigestUtils.sha256Hex(saltPassword.getBytes());
} | [
"public",
"static",
"String",
"encrypt",
"(",
"String",
"password",
",",
"String",
"salt",
")",
"{",
"String",
"saltPassword",
"=",
"password",
"+",
"salt",
";",
"return",
"DigestUtils",
".",
"sha256Hex",
"(",
"saltPassword",
".",
"getBytes",
"(",
")",
")",
... | Encrypt a password string with a given password.
@param password The origin password need to be encrypt.
@param salt The salt.
@return The encrypted password. | [
"Encrypt",
"a",
"password",
"string",
"with",
"a",
"given",
"password",
"."
] | 98618ae31fd80000c794661b4c130af1b1298d9b | https://github.com/wb14123/bard/blob/98618ae31fd80000c794661b4c130af1b1298d9b/bard-util/bard-user/src/main/java/com/bardframework/bard/util/user/PasswordEncrypter.java#L29-L32 |
149,489 | greese/dasein-util | src/main/java/org/dasein/media/ImageIngester.java | ImageIngester.checkSwf | @SuppressWarnings("unused")
private boolean checkSwf() throws IOException {
//get rid of the last byte of the signature, the byte of the version and 4 bytes of the size
byte[] a = new byte[6];
if (read(a) != a.length) {
return false;
}
format = FORMAT_SWF;
int bitSize = (int)readUBits( 5 );
int min... | java | @SuppressWarnings("unused")
private boolean checkSwf() throws IOException {
//get rid of the last byte of the signature, the byte of the version and 4 bytes of the size
byte[] a = new byte[6];
if (read(a) != a.length) {
return false;
}
format = FORMAT_SWF;
int bitSize = (int)readUBits( 5 );
int min... | [
"@",
"SuppressWarnings",
"(",
"\"unused\"",
")",
"private",
"boolean",
"checkSwf",
"(",
")",
"throws",
"IOException",
"{",
"//get rid of the last byte of the signature, the byte of the version and 4 bytes of the size",
"byte",
"[",
"]",
"a",
"=",
"new",
"byte",
"[",
"6",
... | Written by Michael Aird. | [
"Written",
"by",
"Michael",
"Aird",
"."
] | 648606dcb4bd382e3287a6c897a32e65d553dc47 | https://github.com/greese/dasein-util/blob/648606dcb4bd382e3287a6c897a32e65d553dc47/src/main/java/org/dasein/media/ImageIngester.java#L704-L722 |
149,490 | greese/dasein-util | src/main/java/org/dasein/media/ImageIngester.java | ImageIngester.getComment | public String getComment(int index) {
if (comments == null || index < 0 || index >= comments.size()) {
throw new IllegalArgumentException("Not a valid comment index: " + index);
}
return (String)comments.get(index);
} | java | public String getComment(int index) {
if (comments == null || index < 0 || index >= comments.size()) {
throw new IllegalArgumentException("Not a valid comment index: " + index);
}
return (String)comments.get(index);
} | [
"public",
"String",
"getComment",
"(",
"int",
"index",
")",
"{",
"if",
"(",
"comments",
"==",
"null",
"||",
"index",
"<",
"0",
"||",
"index",
">=",
"comments",
".",
"size",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Not a val... | Returns the index'th comment retrieved from the image.
@throws IllegalArgumentException if index is smaller than 0 or larger than or equal
to the number of comments retrieved
@see #getNumberOfComments | [
"Returns",
"the",
"index",
"th",
"comment",
"retrieved",
"from",
"the",
"image",
"."
] | 648606dcb4bd382e3287a6c897a32e65d553dc47 | https://github.com/greese/dasein-util/blob/648606dcb4bd382e3287a6c897a32e65d553dc47/src/main/java/org/dasein/media/ImageIngester.java#L748-L753 |
149,491 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.getDefaultDocument | public static synchronized Document getDefaultDocument()
{
if (defaultDocument == null)
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = null;
try
{
... | java | public static synchronized Document getDefaultDocument()
{
if (defaultDocument == null)
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = null;
try
{
... | [
"public",
"static",
"synchronized",
"Document",
"getDefaultDocument",
"(",
")",
"{",
"if",
"(",
"defaultDocument",
"==",
"null",
")",
"{",
"DocumentBuilderFactory",
"documentBuilderFactory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"DocumentBu... | Returns a default XML document
@return The default XML document | [
"Returns",
"a",
"default",
"XML",
"document"
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L72-L91 |
149,492 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.write | private static void write(
Node node, Writer writer, int indentation, boolean omitXmlDeclaration)
{
TransformerFactory transformerFactory =
TransformerFactory.newInstance();
if (indentation > 0)
{
transformerFactory.setAttribute("indent-number", indent... | java | private static void write(
Node node, Writer writer, int indentation, boolean omitXmlDeclaration)
{
TransformerFactory transformerFactory =
TransformerFactory.newInstance();
if (indentation > 0)
{
transformerFactory.setAttribute("indent-number", indent... | [
"private",
"static",
"void",
"write",
"(",
"Node",
"node",
",",
"Writer",
"writer",
",",
"int",
"indentation",
",",
"boolean",
"omitXmlDeclaration",
")",
"{",
"TransformerFactory",
"transformerFactory",
"=",
"TransformerFactory",
".",
"newInstance",
"(",
")",
";",... | Writes a formatted String representation of the given XML node
to the given writer.
@param node The node
@param writer The writer to write to
@param indentation The indentation. If this is not positive, then
no indentation will be performed
@param omitXmlDeclaration Whether the XML declaration should be omitted
@throw... | [
"Writes",
"a",
"formatted",
"String",
"representation",
"of",
"the",
"given",
"XML",
"node",
"to",
"the",
"given",
"writer",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L178-L216 |
149,493 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.read | public static Node read(InputStream inputStream) throws XmlException
{
try
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuil... | java | public static Node read(InputStream inputStream) throws XmlException
{
try
{
DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder =
documentBuilderFactory.newDocumentBuil... | [
"public",
"static",
"Node",
"read",
"(",
"InputStream",
"inputStream",
")",
"throws",
"XmlException",
"{",
"try",
"{",
"DocumentBuilderFactory",
"documentBuilderFactory",
"=",
"DocumentBuilderFactory",
".",
"newInstance",
"(",
")",
";",
"DocumentBuilder",
"documentBuild... | Creates an XML node by reading the contents of the given input stream.
@param inputStream The input stream to read from
@return The parsed node
@throws XmlException If there was an error while reading | [
"Creates",
"an",
"XML",
"node",
"by",
"reading",
"the",
"contents",
"of",
"the",
"given",
"input",
"stream",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L236-L262 |
149,494 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.getAttributeValue | public static String getAttributeValue(
Node node, String attributeName, String defaultValue)
{
NamedNodeMap attributes = node.getAttributes();
Node attributeNode = attributes.getNamedItem(attributeName);
if (attributeNode == null)
{
return defaultValue;
... | java | public static String getAttributeValue(
Node node, String attributeName, String defaultValue)
{
NamedNodeMap attributes = node.getAttributes();
Node attributeNode = attributes.getNamedItem(attributeName);
if (attributeNode == null)
{
return defaultValue;
... | [
"public",
"static",
"String",
"getAttributeValue",
"(",
"Node",
"node",
",",
"String",
"attributeName",
",",
"String",
"defaultValue",
")",
"{",
"NamedNodeMap",
"attributes",
"=",
"node",
".",
"getAttributes",
"(",
")",
";",
"Node",
"attributeNode",
"=",
"attrib... | Returns the attribute with the given name from the given node.
If the respective attribute could not be obtained, the given
default value will be returned
@param node The node to obtain the attribute from
@param attributeName The name of the attribute
@param defaultValue The default value to return when the specified
... | [
"Returns",
"the",
"attribute",
"with",
"the",
"given",
"name",
"from",
"the",
"given",
"node",
".",
"If",
"the",
"respective",
"attribute",
"could",
"not",
"be",
"obtained",
"the",
"given",
"default",
"value",
"will",
"be",
"returned"
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L295-L310 |
149,495 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.getRequiredAttributeValue | public static String getRequiredAttributeValue(
Node node, String attributeName)
{
NamedNodeMap attributes = node.getAttributes();
Node attributeNode = attributes.getNamedItem(attributeName);
if (attributeNode == null)
{
throw new XmlException(
... | java | public static String getRequiredAttributeValue(
Node node, String attributeName)
{
NamedNodeMap attributes = node.getAttributes();
Node attributeNode = attributes.getNamedItem(attributeName);
if (attributeNode == null)
{
throw new XmlException(
... | [
"public",
"static",
"String",
"getRequiredAttributeValue",
"(",
"Node",
"node",
",",
"String",
"attributeName",
")",
"{",
"NamedNodeMap",
"attributes",
"=",
"node",
".",
"getAttributes",
"(",
")",
";",
"Node",
"attributeNode",
"=",
"attributes",
".",
"getNamedItem... | Returns the attribute with the given name from the given node.
@param node The node to obtain the attribute from
@param attributeName The name of the attribute
@return The value of the attribute
@throws XmlException If no value of the attribute with the given
name could be obtained. | [
"Returns",
"the",
"attribute",
"with",
"the",
"given",
"name",
"from",
"the",
"given",
"node",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L322-L339 |
149,496 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.resolveAttributeFromMap | static <T> T resolveAttributeFromMap(
Node node, String attributeName, Map<String, ? extends T> map)
{
String id = XmlUtils.getAttributeValue(node, attributeName, null);
if (id == null)
{
throw new XmlException(
"No attribute \""+attributeName+"\" f... | java | static <T> T resolveAttributeFromMap(
Node node, String attributeName, Map<String, ? extends T> map)
{
String id = XmlUtils.getAttributeValue(node, attributeName, null);
if (id == null)
{
throw new XmlException(
"No attribute \""+attributeName+"\" f... | [
"static",
"<",
"T",
">",
"T",
"resolveAttributeFromMap",
"(",
"Node",
"node",
",",
"String",
"attributeName",
",",
"Map",
"<",
"String",
",",
"?",
"extends",
"T",
">",
"map",
")",
"{",
"String",
"id",
"=",
"XmlUtils",
".",
"getAttributeValue",
"(",
"node... | Resolve the value in the given map whose key is the value of
the specified attribute.
@param <T> The type of the elements in the map
@param node The node
@param attributeName The name of the attribute
@param map The map
@return The value in the map whose key is the value of the
specified attribute
@throws XmlException... | [
"Resolve",
"the",
"value",
"in",
"the",
"given",
"map",
"whose",
"key",
"is",
"the",
"value",
"of",
"the",
"specified",
"attribute",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L468-L484 |
149,497 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.readInt | static int readInt(Node node)
{
if (node == null)
{
throw new XmlException(
"Tried to read int value from null node");
}
String value = node.getFirstChild().getNodeValue();
if (value == null)
{
throw new XmlException(
... | java | static int readInt(Node node)
{
if (node == null)
{
throw new XmlException(
"Tried to read int value from null node");
}
String value = node.getFirstChild().getNodeValue();
if (value == null)
{
throw new XmlException(
... | [
"static",
"int",
"readInt",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"XmlException",
"(",
"\"Tried to read int value from null node\"",
")",
";",
"}",
"String",
"value",
"=",
"node",
".",
"getFirstChild",
"(",... | Parse an int value from the first child of the given node.
@param node The node
@return The int value
@throws XmlException If the given node was <code>null</code>, or no
int value could be parsed | [
"Parse",
"an",
"int",
"value",
"from",
"the",
"first",
"child",
"of",
"the",
"given",
"node",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L495-L517 |
149,498 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.readDouble | static double readDouble(Node node)
{
if (node == null)
{
throw new XmlException(
"Tried to read double value from null node");
}
String value = node.getFirstChild().getNodeValue();
if (value == null)
{
throw new XmlEx... | java | static double readDouble(Node node)
{
if (node == null)
{
throw new XmlException(
"Tried to read double value from null node");
}
String value = node.getFirstChild().getNodeValue();
if (value == null)
{
throw new XmlEx... | [
"static",
"double",
"readDouble",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"XmlException",
"(",
"\"Tried to read double value from null node\"",
")",
";",
"}",
"String",
"value",
"=",
"node",
".",
"getFirstChild... | Parse a double value from the first child of the given node.
@param node The node
@return The double value
@throws XmlException If the given node was <code>null</code>, or no
double value could be parsed | [
"Parse",
"a",
"double",
"value",
"from",
"the",
"first",
"child",
"of",
"the",
"given",
"node",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L527-L549 |
149,499 | javagl/Common | src/main/java/de/javagl/common/xml/XmlUtils.java | XmlUtils.readBoolean | static boolean readBoolean(Node node)
{
if (node == null)
{
throw new XmlException(
"Tried to read boolean value from null node");
}
String value = node.getFirstChild().getNodeValue();
return Boolean.parseBoolean(value);
} | java | static boolean readBoolean(Node node)
{
if (node == null)
{
throw new XmlException(
"Tried to read boolean value from null node");
}
String value = node.getFirstChild().getNodeValue();
return Boolean.parseBoolean(value);
} | [
"static",
"boolean",
"readBoolean",
"(",
"Node",
"node",
")",
"{",
"if",
"(",
"node",
"==",
"null",
")",
"{",
"throw",
"new",
"XmlException",
"(",
"\"Tried to read boolean value from null node\"",
")",
";",
"}",
"String",
"value",
"=",
"node",
".",
"getFirstCh... | Parse a boolean value from the first child of the given node.
@param node The node
@return The boolean value
@throws XmlException If the given node was <code>null</code> | [
"Parse",
"a",
"boolean",
"value",
"from",
"the",
"first",
"child",
"of",
"the",
"given",
"node",
"."
] | 5a4876b48c3a2dc61d21324733cf37512d721c33 | https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L558-L567 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.