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
122,000
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.pink
public static Style pink() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PINK); return style; }
java
public static Style pink() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PINK); return style; }
[ "public", "static", "Style", "pink", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_PINK", ")", ";", "return", "style", "...
Default material pink transparent style for SuperToasts. @return A new Style
[ "Default", "material", "pink", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L324-L328
122,001
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.purple
public static Style purple() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PURPLE); return style; }
java
public static Style purple() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PURPLE); return style; }
[ "public", "static", "Style", "purple", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_PURPLE", ")", ";", "return", "style",...
Default material purple transparent style for SuperToasts. @return A new Style
[ "Default", "material", "purple", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L334-L338
122,002
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.deepPurple
public static Style deepPurple() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_PURPLE); return style; }
java
public static Style deepPurple() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_PURPLE); return style; }
[ "public", "static", "Style", "deepPurple", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_DEEP_PURPLE", ")", ";", "return", ...
Default material deep purple transparent style for SuperToasts. @return A new Style
[ "Default", "material", "deep", "purple", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L344-L348
122,003
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.indigo
public static Style indigo() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_INDIGO); return style; }
java
public static Style indigo() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_INDIGO); return style; }
[ "public", "static", "Style", "indigo", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_INDIGO", ")", ";", "return", "style",...
Default material indigo transparent style for SuperToasts. @return A new Style
[ "Default", "material", "indigo", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L354-L358
122,004
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.blue
public static Style blue() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE); return style; }
java
public static Style blue() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE); return style; }
[ "public", "static", "Style", "blue", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_BLUE", ")", ";", "return", "style", "...
Default material blue transparent style for SuperToasts. @return A new Style
[ "Default", "material", "blue", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L364-L368
122,005
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.lightBlue
public static Style lightBlue() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIGHT_BLUE); return style; }
java
public static Style lightBlue() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIGHT_BLUE); return style; }
[ "public", "static", "Style", "lightBlue", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_LIGHT_BLUE", ")", ";", "return", "...
Default material light blue transparent style for SuperToasts. @return A new Style
[ "Default", "material", "light", "blue", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L374-L378
122,006
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.cyan
public static Style cyan() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_CYAN); return style; }
java
public static Style cyan() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_CYAN); return style; }
[ "public", "static", "Style", "cyan", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_CYAN", ")", ";", "return", "style", "...
Default material cyan transparent style for SuperToasts. @return A new Style
[ "Default", "material", "cyan", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L384-L388
122,007
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.teal
public static Style teal() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_TEAL); return style; }
java
public static Style teal() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_TEAL); return style; }
[ "public", "static", "Style", "teal", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_TEAL", ")", ";", "return", "style", "...
Default material teal transparent style for SuperToasts. @return A new Style
[ "Default", "material", "teal", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L394-L398
122,008
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.green
public static Style green() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_GREEN); return style; }
java
public static Style green() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_GREEN); return style; }
[ "public", "static", "Style", "green", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_GREEN", ")", ";", "return", "style", ...
Default material green transparent style for SuperToasts. @return A new Style
[ "Default", "material", "green", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L404-L408
122,009
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.lightGreen
public static Style lightGreen() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIGHT_GREEN); return style; }
java
public static Style lightGreen() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIGHT_GREEN); return style; }
[ "public", "static", "Style", "lightGreen", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_LIGHT_GREEN", ")", ";", "return", ...
Default material light green transparent style for SuperToasts. @return A new Style
[ "Default", "material", "light", "green", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L414-L418
122,010
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.lime
public static Style lime() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIME); style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY); style.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GRE...
java
public static Style lime() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_LIME); style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY); style.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GRE...
[ "public", "static", "Style", "lime", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_LIME", ")", ";", "style", ".", "messa...
Default material lime transparent style for SuperToasts. @return A new Style
[ "Default", "material", "lime", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L424-L431
122,011
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.yellow
public static Style yellow() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_YELLOW); style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY); style.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.DARK...
java
public static Style yellow() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_YELLOW); style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.DARK_GREY); style.buttonDividerColor = PaletteUtils.getSolidColor(PaletteUtils.DARK...
[ "public", "static", "Style", "yellow", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_YELLOW", ")", ";", "style", ".", "m...
Default material yellow transparent style for SuperToasts. @return A new Style
[ "Default", "material", "yellow", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L437-L444
122,012
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.amber
public static Style amber() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_AMBER); return style; }
java
public static Style amber() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_AMBER); return style; }
[ "public", "static", "Style", "amber", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_AMBER", ")", ";", "return", "style", ...
Default material amber transparent style for SuperToasts. @return A new Style
[ "Default", "material", "amber", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L450-L454
122,013
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.orange
public static Style orange() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_ORANGE); return style; }
java
public static Style orange() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_ORANGE); return style; }
[ "public", "static", "Style", "orange", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_ORANGE", ")", ";", "return", "style",...
Default material orange transparent style for SuperToasts. @return A new Style
[ "Default", "material", "orange", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L460-L464
122,014
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.deepOrange
public static Style deepOrange() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_ORANGE); return style; }
java
public static Style deepOrange() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_DEEP_ORANGE); return style; }
[ "public", "static", "Style", "deepOrange", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_DEEP_ORANGE", ")", ";", "return", ...
Default material deep orange transparent style for SuperToasts. @return A new Style
[ "Default", "material", "deep", "orange", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L470-L474
122,015
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.brown
public static Style brown() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN); return style; }
java
public static Style brown() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN); return style; }
[ "public", "static", "Style", "brown", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_BROWN", ")", ";", "return", "style", ...
Default material brown transparent style for SuperToasts. @return A new Style
[ "Default", "material", "brown", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L480-L484
122,016
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.grey
public static Style grey() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_GREY); return style; }
java
public static Style grey() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_GREY); return style; }
[ "public", "static", "Style", "grey", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_GREY", ")", ";", "return", "style", "...
Default material grey transparent style for SuperToasts. @return A new Style
[ "Default", "material", "grey", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L490-L494
122,017
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.blueGrey
public static Style blueGrey() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE_GREY); return style; }
java
public static Style blueGrey() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BLUE_GREY); return style; }
[ "public", "static", "Style", "blueGrey", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_BLUE_GREY", ")", ";", "return", "st...
Default material blue-grey transparent style for SuperToasts. @return A new Style
[ "Default", "material", "blue", "-", "grey", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L500-L504
122,018
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java
Style.rottenBanana
public static Style rottenBanana() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_YELLOW); style.frame = FRAME_LOLLIPOP; style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN); style.buttonDividerCo...
java
public static Style rottenBanana() { final Style style = new Style(); style.color = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_YELLOW); style.frame = FRAME_LOLLIPOP; style.messageTextColor = PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_BROWN); style.buttonDividerCo...
[ "public", "static", "Style", "rottenBanana", "(", ")", "{", "final", "Style", "style", "=", "new", "Style", "(", ")", ";", "style", ".", "color", "=", "PaletteUtils", ".", "getSolidColor", "(", "PaletteUtils", ".", "MATERIAL_YELLOW", ")", ";", "style", "."...
Default material rotten banana transparent style for SuperToasts. @return A new Style
[ "Default", "material", "rotten", "banana", "transparent", "style", "for", "SuperToasts", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Style.java#L510-L519
122,019
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/SuperActivityToast.java
SuperActivityToast.setProgress
public SuperActivityToast setProgress(int progress) { if (this.mProgressBar == null) { Log.e(getClass().getName(), "Could not set SuperActivityToast " + "progress, are you sure you set the type to TYPE_PROGRESS_CIRCLE " + "or TYPE_PROGRESS_BAR?"); ...
java
public SuperActivityToast setProgress(int progress) { if (this.mProgressBar == null) { Log.e(getClass().getName(), "Could not set SuperActivityToast " + "progress, are you sure you set the type to TYPE_PROGRESS_CIRCLE " + "or TYPE_PROGRESS_BAR?"); ...
[ "public", "SuperActivityToast", "setProgress", "(", "int", "progress", ")", "{", "if", "(", "this", ".", "mProgressBar", "==", "null", ")", "{", "Log", ".", "e", "(", "getClass", "(", ")", ".", "getName", "(", ")", ",", "\"Could not set SuperActivityToast \"...
Set the progress of the ProgressBar in a TYPE_PROGRESS_BAR SuperActivityToast. This can be called multiple times after the SuperActivityToast is showing. @param progress The desired progress @return The current SuperActivityToast instance
[ "Set", "the", "progress", "of", "the", "ProgressBar", "in", "a", "TYPE_PROGRESS_BAR", "SuperActivityToast", ".", "This", "can", "be", "called", "multiple", "times", "after", "the", "SuperActivityToast", "is", "showing", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/SuperActivityToast.java#L557-L567
122,020
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/SuperToast.java
SuperToast.onCreateView
@SuppressLint("InflateParams") protected View onCreateView(Context context, LayoutInflater layoutInflater, int type) { return layoutInflater.inflate(R.layout.supertoast, null); }
java
@SuppressLint("InflateParams") protected View onCreateView(Context context, LayoutInflater layoutInflater, int type) { return layoutInflater.inflate(R.layout.supertoast, null); }
[ "@", "SuppressLint", "(", "\"InflateParams\"", ")", "protected", "View", "onCreateView", "(", "Context", "context", ",", "LayoutInflater", "layoutInflater", ",", "int", "type", ")", "{", "return", "layoutInflater", ".", "inflate", "(", "R", ".", "layout", ".", ...
Protected View that is overridden by the SuperActivityToast class.
[ "Protected", "View", "that", "is", "overridden", "by", "the", "SuperActivityToast", "class", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/SuperToast.java#L154-L157
122,021
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/utils/BackgroundUtils.java
BackgroundUtils.convertToDIP
public static int convertToDIP(int pixels) { return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, pixels, Resources.getSystem().getDisplayMetrics())); }
java
public static int convertToDIP(int pixels) { return Math.round(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, pixels, Resources.getSystem().getDisplayMetrics())); }
[ "public", "static", "int", "convertToDIP", "(", "int", "pixels", ")", "{", "return", "Math", ".", "round", "(", "TypedValue", ".", "applyDimension", "(", "TypedValue", ".", "COMPLEX_UNIT_DIP", ",", "pixels", ",", "Resources", ".", "getSystem", "(", ")", ".",...
Returns a density independent pixel value rounded to the nearest integer for the desired dimension. @param pixels The pixel value to be converted @return A rounded DIP value
[ "Returns", "a", "density", "independent", "pixel", "value", "rounded", "to", "the", "nearest", "integer", "for", "the", "desired", "dimension", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/utils/BackgroundUtils.java#L96-L99
122,022
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java
Toaster.showNextSuperToast
private void showNextSuperToast() { // Do nothing if the queue is empty if (superToastPriorityQueue.isEmpty()) return; // Get next SuperToast in the queue final SuperToast superToast = superToastPriorityQueue.peek(); if (!superToast.isShowing()) { final Messag...
java
private void showNextSuperToast() { // Do nothing if the queue is empty if (superToastPriorityQueue.isEmpty()) return; // Get next SuperToast in the queue final SuperToast superToast = superToastPriorityQueue.peek(); if (!superToast.isShowing()) { final Messag...
[ "private", "void", "showNextSuperToast", "(", ")", "{", "// Do nothing if the queue is empty\r", "if", "(", "superToastPriorityQueue", ".", "isEmpty", "(", ")", ")", "return", ";", "// Get next SuperToast in the queue\r", "final", "SuperToast", "superToast", "=", "superTo...
Show the next SuperToast in the current queue. If a SuperToast is currently showing, do nothing. The currently showing SuperToast will call this method when it dismisses.
[ "Show", "the", "next", "SuperToast", "in", "the", "current", "queue", ".", "If", "a", "SuperToast", "is", "currently", "showing", "do", "nothing", ".", "The", "currently", "showing", "SuperToast", "will", "call", "this", "method", "when", "it", "dismisses", ...
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java#L106-L117
122,023
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java
Toaster.sendDelayedMessage
private void sendDelayedMessage(SuperToast superToast, int messageId, long delay) { Message message = obtainMessage(messageId); message.obj = superToast; sendMessageDelayed(message, delay); }
java
private void sendDelayedMessage(SuperToast superToast, int messageId, long delay) { Message message = obtainMessage(messageId); message.obj = superToast; sendMessageDelayed(message, delay); }
[ "private", "void", "sendDelayedMessage", "(", "SuperToast", "superToast", ",", "int", "messageId", ",", "long", "delay", ")", "{", "Message", "message", "=", "obtainMessage", "(", "messageId", ")", ";", "message", ".", "obj", "=", "superToast", ";", "sendMessa...
Send a message at a later time. This is used to dismiss a SuperToast.
[ "Send", "a", "message", "at", "a", "later", "time", ".", "This", "is", "used", "to", "dismiss", "a", "SuperToast", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java#L122-L126
122,024
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java
Toaster.displaySuperToast
private void displaySuperToast(SuperToast superToast) { // Make sure the SuperToast isn't already showing for some reason if (superToast.isShowing()) return; // If the SuperToast is a SuperActivityToast, show it via the supplied ViewGroup if (superToast instanceof SuperActivityTo...
java
private void displaySuperToast(SuperToast superToast) { // Make sure the SuperToast isn't already showing for some reason if (superToast.isShowing()) return; // If the SuperToast is a SuperActivityToast, show it via the supplied ViewGroup if (superToast instanceof SuperActivityTo...
[ "private", "void", "displaySuperToast", "(", "SuperToast", "superToast", ")", "{", "// Make sure the SuperToast isn't already showing for some reason\r", "if", "(", "superToast", ".", "isShowing", "(", ")", ")", "return", ";", "// If the SuperToast is a SuperActivityToast, show...
Try to show the SuperToast. SuperToasts will be shown using the WindowManager while SuperActivityToasts will be shown using their supplied ViewGroup. @param superToast the SuperToast (or SuperActivityToast) to be shown
[ "Try", "to", "show", "the", "SuperToast", ".", "SuperToasts", "will", "be", "shown", "using", "the", "WindowManager", "while", "SuperActivityToasts", "will", "be", "shown", "using", "their", "supplied", "ViewGroup", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java#L152-L193
122,025
JohnPersano/SuperToasts
library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java
Toaster.removeSuperToast
void removeSuperToast(final SuperToast superToast) { // If the SuperToast is a SuperActivityToast, remove it from the supplied ViewGroup if (superToast instanceof SuperActivityToast) { // If SuperActivityToast has already been dismissed, do not attempt to dismiss it again if ...
java
void removeSuperToast(final SuperToast superToast) { // If the SuperToast is a SuperActivityToast, remove it from the supplied ViewGroup if (superToast instanceof SuperActivityToast) { // If SuperActivityToast has already been dismissed, do not attempt to dismiss it again if ...
[ "void", "removeSuperToast", "(", "final", "SuperToast", "superToast", ")", "{", "// If the SuperToast is a SuperActivityToast, remove it from the supplied ViewGroup\r", "if", "(", "superToast", "instanceof", "SuperActivityToast", ")", "{", "// If SuperActivityToast has already been d...
Removes a showing SuperToast. This method will poll the Queue as well as try to show the next SuperToast if one exists in the Queue. @param superToast the SuperToast (or SuperActivityToast) to be removed
[ "Removes", "a", "showing", "SuperToast", ".", "This", "method", "will", "poll", "the", "Queue", "as", "well", "as", "try", "to", "show", "the", "next", "SuperToast", "if", "one", "exists", "in", "the", "Queue", "." ]
5394db6a2f5c38410586d5d001d61f731da1132a
https://github.com/JohnPersano/SuperToasts/blob/5394db6a2f5c38410586d5d001d61f731da1132a/library/src/main/java/com/github/johnpersano/supertoasts/library/Toaster.java#L200-L267
122,026
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/ConnectedCrud.java
ConnectedCrud.create
public void create(final T value) throws SQLException { transactionTemplate .doInTransaction(new SQLFunction<Connection, Object>() { @Override public Object apply(Connection connection) throws SQLException { delegate.create(connection, value); ...
java
public void create(final T value) throws SQLException { transactionTemplate .doInTransaction(new SQLFunction<Connection, Object>() { @Override public Object apply(Connection connection) throws SQLException { delegate.create(connection, value); ...
[ "public", "void", "create", "(", "final", "T", "value", ")", "throws", "SQLException", "{", "transactionTemplate", ".", "doInTransaction", "(", "new", "SQLFunction", "<", "Connection", ",", "Object", ">", "(", ")", "{", "@", "Override", "public", "Object", "...
insert value into the db through the specified connection. @param value the value @throws SQLException if an error occurs
[ "insert", "value", "into", "the", "db", "through", "the", "specified", "connection", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/ConnectedCrud.java#L32-L41
122,027
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/ConnectedCrud.java
ConnectedCrud.delete
public void delete(final Collection<K> keys) throws SQLException { transactionTemplate .doInTransaction(new SQLFunction<Connection, Object>() { @Override public Object apply(Connection connection) throws SQLException { delegate.delete(connection, k...
java
public void delete(final Collection<K> keys) throws SQLException { transactionTemplate .doInTransaction(new SQLFunction<Connection, Object>() { @Override public Object apply(Connection connection) throws SQLException { delegate.delete(connection, k...
[ "public", "void", "delete", "(", "final", "Collection", "<", "K", ">", "keys", ")", "throws", "SQLException", "{", "transactionTemplate", ".", "doInTransaction", "(", "new", "SQLFunction", "<", "Connection", ",", "Object", ">", "(", ")", "{", "@", "Override"...
delete the objects with the specified keys. @param keys the keys @throws SQLException if an error occurs
[ "delete", "the", "objects", "with", "the", "specified", "keys", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/ConnectedCrud.java#L198-L207
122,028
arnaudroger/SimpleFlatMapper
sfm-csv/src/main/java/org/simpleflatmapper/csv/CsvWriter.java
CsvWriter.append
public CsvWriter<T> append(T value) throws IOException { try { mapper.mapTo(value, appendable, mappingContext); } catch(Exception e) { ErrorHelper.rethrow(e); } return this; }
java
public CsvWriter<T> append(T value) throws IOException { try { mapper.mapTo(value, appendable, mappingContext); } catch(Exception e) { ErrorHelper.rethrow(e); } return this; }
[ "public", "CsvWriter", "<", "T", ">", "append", "(", "T", "value", ")", "throws", "IOException", "{", "try", "{", "mapper", ".", "mapTo", "(", "value", ",", "appendable", ",", "mappingContext", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", ...
write the specified value to the underlying appendable. @param value the value to write @return the current writer @throws IOException If an I/O error occurs
[ "write", "the", "specified", "value", "to", "the", "underlying", "appendable", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-csv/src/main/java/org/simpleflatmapper/csv/CsvWriter.java#L82-L89
122,029
arnaudroger/SimpleFlatMapper
sfm-map/src/main/java/org/simpleflatmapper/map/mapper/MapperBuilder.java
MapperBuilder.addKey
public final B addKey(String column) { return addMapping(column, calculatedIndex++, FieldMapperColumnDefinition.<K>key()); }
java
public final B addKey(String column) { return addMapping(column, calculatedIndex++, FieldMapperColumnDefinition.<K>key()); }
[ "public", "final", "B", "addKey", "(", "String", "column", ")", "{", "return", "addMapping", "(", "column", ",", "calculatedIndex", "++", ",", "FieldMapperColumnDefinition", ".", "<", "K", ">", "key", "(", ")", ")", ";", "}" ]
add a new mapping to the specified property with a key property definition and an undefined type. The index is incremented for each non indexed property mapping. @param column the property name @return the current builder
[ "add", "a", "new", "mapping", "to", "the", "specified", "property", "with", "a", "key", "property", "definition", "and", "an", "undefined", "type", ".", "The", "index", "is", "incremented", "for", "each", "non", "indexed", "property", "mapping", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-map/src/main/java/org/simpleflatmapper/map/mapper/MapperBuilder.java#L56-L58
122,030
arnaudroger/SimpleFlatMapper
sfm-map/src/main/java/org/simpleflatmapper/map/mapper/MapperBuilder.java
MapperBuilder.addMapper
@SuppressWarnings("unchecked") public final B addMapper(FieldMapper<ROW, T> mapper) { setRowMapperBuilder.addMapper(mapper); return (B) this; }
java
@SuppressWarnings("unchecked") public final B addMapper(FieldMapper<ROW, T> mapper) { setRowMapperBuilder.addMapper(mapper); return (B) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "final", "B", "addMapper", "(", "FieldMapper", "<", "ROW", ",", "T", ">", "mapper", ")", "{", "setRowMapperBuilder", ".", "addMapper", "(", "mapper", ")", ";", "return", "(", "B", ")", "this", ...
append a FieldMapper to the mapping list. @param mapper the field jdbcMapper @return the current builder
[ "append", "a", "FieldMapper", "to", "the", "mapping", "list", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-map/src/main/java/org/simpleflatmapper/map/mapper/MapperBuilder.java#L133-L137
122,031
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.getterFactory
public JdbcMapperFactory getterFactory(final GetterFactory<ResultSet, JdbcColumnKey> getterFactory) { return addGetterFactory(new ContextualGetterFactoryAdapter<ResultSet, JdbcColumnKey>(getterFactory)); }
java
public JdbcMapperFactory getterFactory(final GetterFactory<ResultSet, JdbcColumnKey> getterFactory) { return addGetterFactory(new ContextualGetterFactoryAdapter<ResultSet, JdbcColumnKey>(getterFactory)); }
[ "public", "JdbcMapperFactory", "getterFactory", "(", "final", "GetterFactory", "<", "ResultSet", ",", "JdbcColumnKey", ">", "getterFactory", ")", "{", "return", "addGetterFactory", "(", "new", "ContextualGetterFactoryAdapter", "<", "ResultSet", ",", "JdbcColumnKey", ">"...
Override the default implementation of the GetterFactory used to get access to value from the ResultSet. @param getterFactory the getterFactory @return the current factory
[ "Override", "the", "default", "implementation", "of", "the", "GetterFactory", "used", "to", "get", "access", "to", "value", "from", "the", "ResultSet", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L91-L93
122,032
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.addCustomFieldMapper
public JdbcMapperFactory addCustomFieldMapper(String key, FieldMapper<ResultSet, ?> fieldMapper) { return addColumnDefinition(key, FieldMapperColumnDefinition.<JdbcColumnKey>customFieldMapperDefinition(fieldMapper)); }
java
public JdbcMapperFactory addCustomFieldMapper(String key, FieldMapper<ResultSet, ?> fieldMapper) { return addColumnDefinition(key, FieldMapperColumnDefinition.<JdbcColumnKey>customFieldMapperDefinition(fieldMapper)); }
[ "public", "JdbcMapperFactory", "addCustomFieldMapper", "(", "String", "key", ",", "FieldMapper", "<", "ResultSet", ",", "?", ">", "fieldMapper", ")", "{", "return", "addColumnDefinition", "(", "key", ",", "FieldMapperColumnDefinition", ".", "<", "JdbcColumnKey", ">"...
Associate the specified FieldMapper for the specified property. @param key the property @param fieldMapper the fieldMapper @return the current factory
[ "Associate", "the", "specified", "FieldMapper", "for", "the", "specified", "property", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L110-L112
122,033
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.addCustomGetter
public JdbcMapperFactory addCustomGetter(String key, Getter<ResultSet, ?> getter) { return addColumnDefinition(key, FieldMapperColumnDefinition.<JdbcColumnKey>customGetter(getter)); }
java
public JdbcMapperFactory addCustomGetter(String key, Getter<ResultSet, ?> getter) { return addColumnDefinition(key, FieldMapperColumnDefinition.<JdbcColumnKey>customGetter(getter)); }
[ "public", "JdbcMapperFactory", "addCustomGetter", "(", "String", "key", ",", "Getter", "<", "ResultSet", ",", "?", ">", "getter", ")", "{", "return", "addColumnDefinition", "(", "key", ",", "FieldMapperColumnDefinition", ".", "<", "JdbcColumnKey", ">", "customGett...
Associate the specified Getter for the specified property. @param key the property @param getter the getter @return the current factory
[ "Associate", "the", "specified", "Getter", "for", "the", "specified", "property", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L120-L122
122,034
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newMapper
public <T> JdbcMapper<T> newMapper(final Class<T> target, final ResultSetMetaData metaData) throws SQLException { JdbcMapperBuilder<T> builder = newBuilder(target); builder.addMapping(metaData); return builder.mapper(); }
java
public <T> JdbcMapper<T> newMapper(final Class<T> target, final ResultSetMetaData metaData) throws SQLException { JdbcMapperBuilder<T> builder = newBuilder(target); builder.addMapping(metaData); return builder.mapper(); }
[ "public", "<", "T", ">", "JdbcMapper", "<", "T", ">", "newMapper", "(", "final", "Class", "<", "T", ">", "target", ",", "final", "ResultSetMetaData", "metaData", ")", "throws", "SQLException", "{", "JdbcMapperBuilder", "<", "T", ">", "builder", "=", "newBu...
Will create a newInstance of JdbcMapper based on the specified metadata and the target class. @param target the target class of the jdbcMapper @param metaData the metadata to create the jdbcMapper from @param <T> the jdbcMapper target type @return a jdbcMapper that will map the data represented by the metadata to an ne...
[ "Will", "create", "a", "newInstance", "of", "JdbcMapper", "based", "on", "the", "specified", "metadata", "and", "the", "target", "class", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L132-L136
122,035
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newBuilder
public <T> JdbcMapperBuilder<T> newBuilder(final Class<T> target) { return newBuilder((Type)target); }
java
public <T> JdbcMapperBuilder<T> newBuilder(final Class<T> target) { return newBuilder((Type)target); }
[ "public", "<", "T", ">", "JdbcMapperBuilder", "<", "T", ">", "newBuilder", "(", "final", "Class", "<", "T", ">", "target", ")", "{", "return", "newBuilder", "(", "(", "Type", ")", "target", ")", ";", "}" ]
Will create a newInstance of JdbcMapperBuilder on the specified target class. @param target the target class @param <T> the jdbcMapper target type @return the builder
[ "Will", "create", "a", "newInstance", "of", "JdbcMapperBuilder", "on", "the", "specified", "target", "class", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L144-L146
122,036
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newBuilder
public <T> JdbcMapperBuilder<T> newBuilder(final TypeReference<T> target) { return newBuilder(target.getType()); }
java
public <T> JdbcMapperBuilder<T> newBuilder(final TypeReference<T> target) { return newBuilder(target.getType()); }
[ "public", "<", "T", ">", "JdbcMapperBuilder", "<", "T", ">", "newBuilder", "(", "final", "TypeReference", "<", "T", ">", "target", ")", "{", "return", "newBuilder", "(", "target", ".", "getType", "(", ")", ")", ";", "}" ]
Will create a newInstance of JdbcMapperBuilder on the type T specified by the typeReference. @param target the typeReference @param <T> the jdbcMapper target type @return the builder
[ "Will", "create", "a", "newInstance", "of", "JdbcMapperBuilder", "on", "the", "type", "T", "specified", "by", "the", "typeReference", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L154-L156
122,037
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newBuilder
public <T> JdbcMapperBuilder<T> newBuilder(final Type target) { ClassMeta<T> classMeta = getClassMeta(target); return newBuilder(classMeta); }
java
public <T> JdbcMapperBuilder<T> newBuilder(final Type target) { ClassMeta<T> classMeta = getClassMeta(target); return newBuilder(classMeta); }
[ "public", "<", "T", ">", "JdbcMapperBuilder", "<", "T", ">", "newBuilder", "(", "final", "Type", "target", ")", "{", "ClassMeta", "<", "T", ">", "classMeta", "=", "getClassMeta", "(", "target", ")", ";", "return", "newBuilder", "(", "classMeta", ")", ";"...
Will create a newInstance of JdbcMapperBuilder on the specified type. @param target the type @param <T> the jdbcMapper target type @return the builder
[ "Will", "create", "a", "newInstance", "of", "JdbcMapperBuilder", "on", "the", "specified", "type", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L164-L167
122,038
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newMapper
public <T> DynamicJdbcMapper<T> newMapper(final Class<T> target) { return newMapper((Type) target); }
java
public <T> DynamicJdbcMapper<T> newMapper(final Class<T> target) { return newMapper((Type) target); }
[ "public", "<", "T", ">", "DynamicJdbcMapper", "<", "T", ">", "newMapper", "(", "final", "Class", "<", "T", ">", "target", ")", "{", "return", "newMapper", "(", "(", "Type", ")", "target", ")", ";", "}" ]
Will create a DynamicMapper on the specified target class. @param target the class @param <T> the jdbcMapper target type @return the DynamicMapper
[ "Will", "create", "a", "DynamicMapper", "on", "the", "specified", "target", "class", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L224-L226
122,039
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newMapper
public <T> DynamicJdbcMapper<T> newMapper(final TypeReference<T> target) { return newMapper(target.getType()); }
java
public <T> DynamicJdbcMapper<T> newMapper(final TypeReference<T> target) { return newMapper(target.getType()); }
[ "public", "<", "T", ">", "DynamicJdbcMapper", "<", "T", ">", "newMapper", "(", "final", "TypeReference", "<", "T", ">", "target", ")", "{", "return", "newMapper", "(", "target", ".", "getType", "(", ")", ")", ";", "}" ]
Will create a DynamicMapper on the type specified by the TypeReference. @param target the TypeReference @param <T> the jdbcMapper target type @return the DynamicMapper
[ "Will", "create", "a", "DynamicMapper", "on", "the", "type", "specified", "by", "the", "TypeReference", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L234-L236
122,040
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newMapper
public <T> DynamicJdbcMapper<T> newMapper(final Type target) { final ClassMeta<T> classMeta = getClassMeta(target); return new DynamicJdbcSetRowMapper<T>(new SetRowMapperFactory<T>(classMeta), new MapperKeyFactory(), new MapperKeyFactory()); }
java
public <T> DynamicJdbcMapper<T> newMapper(final Type target) { final ClassMeta<T> classMeta = getClassMeta(target); return new DynamicJdbcSetRowMapper<T>(new SetRowMapperFactory<T>(classMeta), new MapperKeyFactory(), new MapperKeyFactory()); }
[ "public", "<", "T", ">", "DynamicJdbcMapper", "<", "T", ">", "newMapper", "(", "final", "Type", "target", ")", "{", "final", "ClassMeta", "<", "T", ">", "classMeta", "=", "getClassMeta", "(", "target", ")", ";", "return", "new", "DynamicJdbcSetRowMapper", ...
Will create a DynamicMapper on the specified type. @param target the type @param <T> the jdbcMapper target type @return the DynamicMapper
[ "Will", "create", "a", "DynamicMapper", "on", "the", "specified", "type", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L256-L259
122,041
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java
JdbcMapperFactory.newDiscriminator
public <T> DiscriminatorJdbcBuilder<T> newDiscriminator(String column) { ignorePropertyNotFound(); addColumnDefinition(column, FieldMapperColumnDefinition.<JdbcColumnKey>ignoreDefinition()); return new DiscriminatorJdbcBuilder<T>(column, this); }
java
public <T> DiscriminatorJdbcBuilder<T> newDiscriminator(String column) { ignorePropertyNotFound(); addColumnDefinition(column, FieldMapperColumnDefinition.<JdbcColumnKey>ignoreDefinition()); return new DiscriminatorJdbcBuilder<T>(column, this); }
[ "public", "<", "T", ">", "DiscriminatorJdbcBuilder", "<", "T", ">", "newDiscriminator", "(", "String", "column", ")", "{", "ignorePropertyNotFound", "(", ")", ";", "addColumnDefinition", "(", "column", ",", "FieldMapperColumnDefinition", ".", "<", "JdbcColumnKey", ...
Create a discriminator builder based on the specified property @param column the discriminator property @param <T> the root type of the jdbcMapper @return a builder to specify the type mapping
[ "Create", "a", "discriminator", "builder", "based", "on", "the", "specified", "property" ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperFactory.java#L326-L330
122,042
arnaudroger/SimpleFlatMapper
sfm-map/src/main/java/org/simpleflatmapper/map/mapper/DefaultConstantSourceMapperBuilder.java
DefaultConstantSourceMapperBuilder.addMapping
protected <P> void addMapping(K columnKey, ColumnDefinition<K, ?> columnDefinition, PropertyMeta<T, P> prop) { propertyMappingsBuilder.addProperty(columnKey, columnDefinition, prop); }
java
protected <P> void addMapping(K columnKey, ColumnDefinition<K, ?> columnDefinition, PropertyMeta<T, P> prop) { propertyMappingsBuilder.addProperty(columnKey, columnDefinition, prop); }
[ "protected", "<", "P", ">", "void", "addMapping", "(", "K", "columnKey", ",", "ColumnDefinition", "<", "K", ",", "?", ">", "columnDefinition", ",", "PropertyMeta", "<", "T", ",", "P", ">", "prop", ")", "{", "propertyMappingsBuilder", ".", "addProperty", "(...
the keys are initialised
[ "the", "keys", "are", "initialised" ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-map/src/main/java/org/simpleflatmapper/map/mapper/DefaultConstantSourceMapperBuilder.java#L683-L685
122,043
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java
DiscriminatorJdbcBuilder.when
public DiscriminatorJdbcSubBuilder when(String value, Type type) { return when(new DiscriminatorPredicate(value), type); }
java
public DiscriminatorJdbcSubBuilder when(String value, Type type) { return when(new DiscriminatorPredicate(value), type); }
[ "public", "DiscriminatorJdbcSubBuilder", "when", "(", "String", "value", ",", "Type", "type", ")", "{", "return", "when", "(", "new", "DiscriminatorPredicate", "(", "value", ")", ",", "type", ")", ";", "}" ]
Add a discriminator value with its associated type. @param value the value @param type the type @return the current builder
[ "Add", "a", "discriminator", "value", "with", "its", "associated", "type", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java#L45-L47
122,044
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java
DiscriminatorJdbcBuilder.when
public DiscriminatorJdbcSubBuilder when(Predicate<String> predicate, Type type) { final DiscriminatorJdbcSubBuilder subBuilder = new DiscriminatorJdbcSubBuilder(predicate, type); builders.add(subBuilder); return subBuilder; }
java
public DiscriminatorJdbcSubBuilder when(Predicate<String> predicate, Type type) { final DiscriminatorJdbcSubBuilder subBuilder = new DiscriminatorJdbcSubBuilder(predicate, type); builders.add(subBuilder); return subBuilder; }
[ "public", "DiscriminatorJdbcSubBuilder", "when", "(", "Predicate", "<", "String", ">", "predicate", ",", "Type", "type", ")", "{", "final", "DiscriminatorJdbcSubBuilder", "subBuilder", "=", "new", "DiscriminatorJdbcSubBuilder", "(", "predicate", ",", "type", ")", ";...
Add a discriminator matching predicate with its associated type. @param predicate the predicate @param type the type @return the current builder
[ "Add", "a", "discriminator", "matching", "predicate", "with", "its", "associated", "type", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java#L55-L59
122,045
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java
DiscriminatorJdbcBuilder.when
public DiscriminatorJdbcSubBuilder when(String value, Class<? extends T> type) { return when(value, (Type)type); }
java
public DiscriminatorJdbcSubBuilder when(String value, Class<? extends T> type) { return when(value, (Type)type); }
[ "public", "DiscriminatorJdbcSubBuilder", "when", "(", "String", "value", ",", "Class", "<", "?", "extends", "T", ">", "type", ")", "{", "return", "when", "(", "value", ",", "(", "Type", ")", "type", ")", ";", "}" ]
Add a discriminator value with its associated class. @param value the value @param type the class @return the current builder
[ "Add", "a", "discriminator", "value", "with", "its", "associated", "class", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java#L67-L69
122,046
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java
DiscriminatorJdbcBuilder.when
public DiscriminatorJdbcSubBuilder when(String value, TypeReference<? extends T> type) { return when(value, type.getType()); }
java
public DiscriminatorJdbcSubBuilder when(String value, TypeReference<? extends T> type) { return when(value, type.getType()); }
[ "public", "DiscriminatorJdbcSubBuilder", "when", "(", "String", "value", ",", "TypeReference", "<", "?", "extends", "T", ">", "type", ")", "{", "return", "when", "(", "value", ",", "type", ".", "getType", "(", ")", ")", ";", "}" ]
Add a discriminator value with its associated type specified by the type reference. @param value the value @param type the type reference @return the current builder
[ "Add", "a", "discriminator", "value", "with", "its", "associated", "type", "specified", "by", "the", "type", "reference", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/DiscriminatorJdbcBuilder.java#L77-L79
122,047
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperBuilder.java
JdbcMapperBuilder.addMapping
public JdbcMapperBuilder<T> addMapping(final String column, final int index, final int sqlType) { addMapping(column, index, sqlType, FieldMapperColumnDefinition.<JdbcColumnKey>identity()); return this; }
java
public JdbcMapperBuilder<T> addMapping(final String column, final int index, final int sqlType) { addMapping(column, index, sqlType, FieldMapperColumnDefinition.<JdbcColumnKey>identity()); return this; }
[ "public", "JdbcMapperBuilder", "<", "T", ">", "addMapping", "(", "final", "String", "column", ",", "final", "int", "index", ",", "final", "int", "sqlType", ")", "{", "addMapping", "(", "column", ",", "index", ",", "sqlType", ",", "FieldMapperColumnDefinition",...
add a new mapping to the specified property with the specified index and the specified type. @param column the property name @param index the property index @param sqlType the property type, @see java.sql.Types @return the current builder
[ "add", "a", "new", "mapping", "to", "the", "specified", "property", "with", "the", "specified", "index", "and", "the", "specified", "type", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/JdbcMapperBuilder.java#L148-L151
122,048
arnaudroger/SimpleFlatMapper
sfm-map/src/main/java/org/simpleflatmapper/map/context/MappingContextFactoryBuilder.java
MappingContextFactoryBuilder.getNonEmptyParentIndex
private int getNonEmptyParentIndex() { return parent == null ? -1 : parent.effectiveKeys().isEmpty() ? parent.getNonEmptyParentIndex() : parent.currentIndex; }
java
private int getNonEmptyParentIndex() { return parent == null ? -1 : parent.effectiveKeys().isEmpty() ? parent.getNonEmptyParentIndex() : parent.currentIndex; }
[ "private", "int", "getNonEmptyParentIndex", "(", ")", "{", "return", "parent", "==", "null", "?", "-", "1", ":", "parent", ".", "effectiveKeys", "(", ")", ".", "isEmpty", "(", ")", "?", "parent", ".", "getNonEmptyParentIndex", "(", ")", ":", "parent", "....
ignore empty parent useful to skip root keys
[ "ignore", "empty", "parent", "useful", "to", "skip", "root", "keys" ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-map/src/main/java/org/simpleflatmapper/map/context/MappingContextFactoryBuilder.java#L238-L242
122,049
arnaudroger/SimpleFlatMapper
sfm-csv/src/main/java/org/simpleflatmapper/csv/CsvRow.java
CsvRow.parseInt
public static int parseInt(char[] s, int beginIndex, int endIndex) throws NumberFormatException { s = Objects.requireNonNull(s); if (beginIndex < 0 || beginIndex > endIndex || endIndex > s.length) { throw new IndexOutOfBoundsException(); } if (radix < Character.M...
java
public static int parseInt(char[] s, int beginIndex, int endIndex) throws NumberFormatException { s = Objects.requireNonNull(s); if (beginIndex < 0 || beginIndex > endIndex || endIndex > s.length) { throw new IndexOutOfBoundsException(); } if (radix < Character.M...
[ "public", "static", "int", "parseInt", "(", "char", "[", "]", "s", ",", "int", "beginIndex", ",", "int", "endIndex", ")", "throws", "NumberFormatException", "{", "s", "=", "Objects", ".", "requireNonNull", "(", "s", ")", ";", "if", "(", "beginIndex", "<"...
copy of Integer.parseInt
[ "copy", "of", "Integer", ".", "parseInt" ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-csv/src/main/java/org/simpleflatmapper/csv/CsvRow.java#L319-L376
122,050
arnaudroger/SimpleFlatMapper
sfm-poi/src/main/java/org/simpleflatmapper/poi/SheetMapperFactory.java
SheetMapperFactory.getterFactory
public SheetMapperFactory getterFactory(GetterFactory<Row, CsvColumnKey> getterFactory) { return super.addGetterFactory(new ContextualGetterFactoryAdapter<Row, CsvColumnKey>(getterFactory)); }
java
public SheetMapperFactory getterFactory(GetterFactory<Row, CsvColumnKey> getterFactory) { return super.addGetterFactory(new ContextualGetterFactoryAdapter<Row, CsvColumnKey>(getterFactory)); }
[ "public", "SheetMapperFactory", "getterFactory", "(", "GetterFactory", "<", "Row", ",", "CsvColumnKey", ">", "getterFactory", ")", "{", "return", "super", ".", "addGetterFactory", "(", "new", "ContextualGetterFactoryAdapter", "<", "Row", ",", "CsvColumnKey", ">", "(...
set a new getterFactory. @param getterFactory the getterFactory @return the newInstance
[ "set", "a", "new", "getterFactory", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-poi/src/main/java/org/simpleflatmapper/poi/SheetMapperFactory.java#L46-L48
122,051
arnaudroger/SimpleFlatMapper
sfm-springjdbc/src/main/java/org/simpleflatmapper/jdbc/spring/JdbcTemplateCrud.java
JdbcTemplateCrud.update
public void update(final Collection<T> values) throws DataAccessException { jdbcTemplate.execute(new ConnectionCallback<Object>() { @Override public Object doInConnection(Connection connection) throws SQLException, DataAccessException { crud.update(connection, values); ...
java
public void update(final Collection<T> values) throws DataAccessException { jdbcTemplate.execute(new ConnectionCallback<Object>() { @Override public Object doInConnection(Connection connection) throws SQLException, DataAccessException { crud.update(connection, values); ...
[ "public", "void", "update", "(", "final", "Collection", "<", "T", ">", "values", ")", "throws", "DataAccessException", "{", "jdbcTemplate", ".", "execute", "(", "new", "ConnectionCallback", "<", "Object", ">", "(", ")", "{", "@", "Override", "public", "Objec...
update the objects. @param values the objects @throws DataAccessException if an error occurs
[ "update", "the", "objects", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-springjdbc/src/main/java/org/simpleflatmapper/jdbc/spring/JdbcTemplateCrud.java#L153-L161
122,052
arnaudroger/SimpleFlatMapper
sfm-springjdbc/src/main/java/org/simpleflatmapper/jdbc/spring/JdbcTemplateCrud.java
JdbcTemplateCrud.delete
public void delete(final K key) throws DataAccessException { jdbcTemplate.execute(new ConnectionCallback<Object>() { @Override public Object doInConnection(Connection connection) throws SQLException, DataAccessException { crud.delete(connection, key); retu...
java
public void delete(final K key) throws DataAccessException { jdbcTemplate.execute(new ConnectionCallback<Object>() { @Override public Object doInConnection(Connection connection) throws SQLException, DataAccessException { crud.delete(connection, key); retu...
[ "public", "void", "delete", "(", "final", "K", "key", ")", "throws", "DataAccessException", "{", "jdbcTemplate", ".", "execute", "(", "new", "ConnectionCallback", "<", "Object", ">", "(", ")", "{", "@", "Override", "public", "Object", "doInConnection", "(", ...
delete the object with the specified key. @param key the key @throws DataAccessException if an error occurs
[ "delete", "the", "object", "with", "the", "specified", "key", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-springjdbc/src/main/java/org/simpleflatmapper/jdbc/spring/JdbcTemplateCrud.java#L169-L177
122,053
arnaudroger/SimpleFlatMapper
sfm-reflect/src/main/java/org/simpleflatmapper/reflect/ReflectionInstantiatorDefinitionFactory.java
ReflectionInstantiatorDefinitionFactory._areParameterNamePresent
private static boolean _areParameterNamePresent(Type target) { Class<?> targetClass = TypeHelper.toClass(target); for(Method m : targetClass.getDeclaredMethods()) { final java.lang.reflect.Parameter[] parameters = m.getParameters(); if (parameters.length > 0) { r...
java
private static boolean _areParameterNamePresent(Type target) { Class<?> targetClass = TypeHelper.toClass(target); for(Method m : targetClass.getDeclaredMethods()) { final java.lang.reflect.Parameter[] parameters = m.getParameters(); if (parameters.length > 0) { r...
[ "private", "static", "boolean", "_areParameterNamePresent", "(", "Type", "target", ")", "{", "Class", "<", "?", ">", "targetClass", "=", "TypeHelper", ".", "toClass", "(", "target", ")", ";", "for", "(", "Method", "m", ":", "targetClass", ".", "getDeclaredMe...
assume parameter name are either present or not for the type
[ "assume", "parameter", "name", "are", "either", "present", "or", "not", "for", "the", "type" ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-reflect/src/main/java/org/simpleflatmapper/reflect/ReflectionInstantiatorDefinitionFactory.java#L172-L190
122,054
arnaudroger/SimpleFlatMapper
sfm-csv/src/main/java/org/simpleflatmapper/csv/CsvMapperFactory.java
CsvMapperFactory.newBuilder
public <T> CsvMapperBuilder<T> newBuilder(final Class<T> target) { return newBuilder((Type)target); }
java
public <T> CsvMapperBuilder<T> newBuilder(final Class<T> target) { return newBuilder((Type)target); }
[ "public", "<", "T", ">", "CsvMapperBuilder", "<", "T", ">", "newBuilder", "(", "final", "Class", "<", "T", ">", "target", ")", "{", "return", "newBuilder", "(", "(", "Type", ")", "target", ")", ";", "}" ]
Will create a newInstance of ResultSetMapperBuilder @param target the target class of the jdbcMapper @param <T> the targeted type @return a builder ready to instantiate a jdbcMapper or to be customized @throws MapperBuildingException if an error occurs building the jdbcMapper
[ "Will", "create", "a", "newInstance", "of", "ResultSetMapperBuilder" ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-csv/src/main/java/org/simpleflatmapper/csv/CsvMapperFactory.java#L209-L211
122,055
arnaudroger/SimpleFlatMapper
sfm-map/src/main/java/org/simpleflatmapper/map/context/impl/SingleValueKey.java
SingleValueKey._hashCode
private int _hashCode(Object values) { int valueHash = 0; if (values instanceof Object[]) valueHash = Arrays.deepHashCode((Object[]) values); else if (values instanceof byte[]) valueHash = Arrays.hashCode((byte[]) values); else if (values instanceof short[]) ...
java
private int _hashCode(Object values) { int valueHash = 0; if (values instanceof Object[]) valueHash = Arrays.deepHashCode((Object[]) values); else if (values instanceof byte[]) valueHash = Arrays.hashCode((byte[]) values); else if (values instanceof short[]) ...
[ "private", "int", "_hashCode", "(", "Object", "values", ")", "{", "int", "valueHash", "=", "0", ";", "if", "(", "values", "instanceof", "Object", "[", "]", ")", "valueHash", "=", "Arrays", ".", "deepHashCode", "(", "(", "Object", "[", "]", ")", "values...
copy from Array.deepHashCode0
[ "copy", "from", "Array", ".", "deepHashCode0" ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-map/src/main/java/org/simpleflatmapper/map/context/impl/SingleValueKey.java#L47-L70
122,056
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java
CrudDSL.table
public Crud<T, K> table(String table) { return new LazyCrud<T, K>(this, table); }
java
public Crud<T, K> table(String table) { return new LazyCrud<T, K>(this, table); }
[ "public", "Crud", "<", "T", ",", "K", ">", "table", "(", "String", "table", ")", "{", "return", "new", "LazyCrud", "<", "T", ",", "K", ">", "(", "this", ",", "table", ")", ";", "}" ]
Create a crud against the specified table that will validate on the first interaction with a connection. @param table the table name @return a new crud instance
[ "Create", "a", "crud", "against", "the", "specified", "table", "that", "will", "validate", "on", "the", "first", "interaction", "with", "a", "connection", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java#L44-L46
122,057
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java
CrudDSL.table
public Crud<T, K> table(Connection connection, String table) throws SQLException { CrudMeta crudMeta = CrudMeta.of(connection, table, jdbcMapperFactory.columnDefinitions()); return CrudFactory.<T, K>newInstance(target, keyTarget, crudMeta, jdbcMapperFactory); }
java
public Crud<T, K> table(Connection connection, String table) throws SQLException { CrudMeta crudMeta = CrudMeta.of(connection, table, jdbcMapperFactory.columnDefinitions()); return CrudFactory.<T, K>newInstance(target, keyTarget, crudMeta, jdbcMapperFactory); }
[ "public", "Crud", "<", "T", ",", "K", ">", "table", "(", "Connection", "connection", ",", "String", "table", ")", "throws", "SQLException", "{", "CrudMeta", "crudMeta", "=", "CrudMeta", ".", "of", "(", "connection", ",", "table", ",", "jdbcMapperFactory", ...
Create a crud against the specified table validating it against the specified connection. @param connection the connection @param table the table @return a new crud instance @throws SQLException if an error occurred
[ "Create", "a", "crud", "against", "the", "specified", "table", "validating", "it", "against", "the", "specified", "connection", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java#L55-L58
122,058
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java
CrudDSL.table
public ConnectedCrud<T, K> table(DataSource dataSource, String table) throws SQLException { Connection connection = dataSource.getConnection(); try { return new ConnectedCrud<T, K>(new DataSourceTransactionTemplate(dataSource), table(connection, table)); } finally { conne...
java
public ConnectedCrud<T, K> table(DataSource dataSource, String table) throws SQLException { Connection connection = dataSource.getConnection(); try { return new ConnectedCrud<T, K>(new DataSourceTransactionTemplate(dataSource), table(connection, table)); } finally { conne...
[ "public", "ConnectedCrud", "<", "T", ",", "K", ">", "table", "(", "DataSource", "dataSource", ",", "String", "table", ")", "throws", "SQLException", "{", "Connection", "connection", "=", "dataSource", ".", "getConnection", "(", ")", ";", "try", "{", "return"...
Create a connected crud against the specified table validating it against the specified datasource. @param dataSource the datasource @param table the table @return a new crud instance @throws SQLException if an error occurred
[ "Create", "a", "connected", "crud", "against", "the", "specified", "table", "validating", "it", "against", "the", "specified", "datasource", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java#L67-L74
122,059
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java
CrudDSL.to
public ConnectedCrud<T, K> to(DataSource dataSource) throws SQLException { Connection connection = dataSource.getConnection(); try { return new ConnectedCrud<T, K>(new DataSourceTransactionTemplate(dataSource), to(connection)); } finally { connection.close(); } ...
java
public ConnectedCrud<T, K> to(DataSource dataSource) throws SQLException { Connection connection = dataSource.getConnection(); try { return new ConnectedCrud<T, K>(new DataSourceTransactionTemplate(dataSource), to(connection)); } finally { connection.close(); } ...
[ "public", "ConnectedCrud", "<", "T", ",", "K", ">", "to", "(", "DataSource", "dataSource", ")", "throws", "SQLException", "{", "Connection", "connection", "=", "dataSource", ".", "getConnection", "(", ")", ";", "try", "{", "return", "new", "ConnectedCrud", "...
Create a connected crud validating it against the specified datasource. The table name is derived from the jpa annotation or from the class name. @param dataSource the datasource @return a new crud instance @throws SQLException if an error occurred
[ "Create", "a", "connected", "crud", "validating", "it", "against", "the", "specified", "datasource", ".", "The", "table", "name", "is", "derived", "from", "the", "jpa", "annotation", "or", "from", "the", "class", "name", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java#L83-L90
122,060
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java
CrudDSL.to
public Crud<T, K> to(Connection connection) throws SQLException { return table(connection, getTable(connection, target)); }
java
public Crud<T, K> to(Connection connection) throws SQLException { return table(connection, getTable(connection, target)); }
[ "public", "Crud", "<", "T", ",", "K", ">", "to", "(", "Connection", "connection", ")", "throws", "SQLException", "{", "return", "table", "(", "connection", ",", "getTable", "(", "connection", ",", "target", ")", ")", ";", "}" ]
Create a connected crud validating it against the specified connection. The table name is derived from the jpa annotation or from the class name. @param connection the connection @return a new crud instance @throws SQLException if an error occurred
[ "Create", "a", "connected", "crud", "validating", "it", "against", "the", "specified", "connection", ".", "The", "table", "name", "is", "derived", "from", "the", "jpa", "annotation", "or", "from", "the", "class", "name", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/CrudDSL.java#L99-L101
122,061
JOML-CI/JOML
src/org/joml/RayAabIntersection.java
RayAabIntersection.precomputeSlope
private void precomputeSlope() { float invDirX = 1.0f / dirX; float invDirY = 1.0f / dirY; float invDirZ = 1.0f / dirZ; s_yx = dirX * invDirY; s_xy = dirY * invDirX; s_zy = dirY * invDirZ; s_yz = dirZ * invDirY; s_xz = dirZ * invDirX; s_zx = dirX *...
java
private void precomputeSlope() { float invDirX = 1.0f / dirX; float invDirY = 1.0f / dirY; float invDirZ = 1.0f / dirZ; s_yx = dirX * invDirY; s_xy = dirY * invDirX; s_zy = dirY * invDirZ; s_yz = dirZ * invDirY; s_xz = dirZ * invDirX; s_zx = dirX *...
[ "private", "void", "precomputeSlope", "(", ")", "{", "float", "invDirX", "=", "1.0f", "/", "dirX", ";", "float", "invDirY", "=", "1.0f", "/", "dirY", ";", "float", "invDirZ", "=", "1.0f", "/", "dirZ", ";", "s_yx", "=", "dirX", "*", "invDirY", ";", "s...
Precompute the values necessary for the ray slope algorithm.
[ "Precompute", "the", "values", "necessary", "for", "the", "ray", "slope", "algorithm", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/RayAabIntersection.java#L117-L137
122,062
JOML-CI/JOML
src/org/joml/Quaterniond.java
Quaterniond.rotationX
public Quaterniond rotationX(double angle) { double sin = Math.sin(angle * 0.5); double cos = Math.cosFromSin(sin, angle * 0.5); w = cos; x = sin; y = 0.0; z = 0.0; return this; }
java
public Quaterniond rotationX(double angle) { double sin = Math.sin(angle * 0.5); double cos = Math.cosFromSin(sin, angle * 0.5); w = cos; x = sin; y = 0.0; z = 0.0; return this; }
[ "public", "Quaterniond", "rotationX", "(", "double", "angle", ")", "{", "double", "sin", "=", "Math", ".", "sin", "(", "angle", "*", "0.5", ")", ";", "double", "cos", "=", "Math", ".", "cosFromSin", "(", "sin", ",", "angle", "*", "0.5", ")", ";", "...
Set this quaternion to represent a rotation of the given radians about the x axis. @param angle the angle in radians to rotate about the x axis @return this
[ "Set", "this", "quaternion", "to", "represent", "a", "rotation", "of", "the", "given", "radians", "about", "the", "x", "axis", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaterniond.java#L2028-L2036
122,063
JOML-CI/JOML
src/org/joml/Vector3f.java
Vector3f.div
public Vector3f div(Vector3fc v) { return div(v.x(), v.y(), v.z(), thisOrNew()); }
java
public Vector3f div(Vector3fc v) { return div(v.x(), v.y(), v.z(), thisOrNew()); }
[ "public", "Vector3f", "div", "(", "Vector3fc", "v", ")", "{", "return", "div", "(", "v", ".", "x", "(", ")", ",", "v", ".", "y", "(", ")", ",", "v", ".", "z", "(", ")", ",", "thisOrNew", "(", ")", ")", ";", "}" ]
Divide this Vector3f component-wise by another Vector3fc. @param v the vector to divide by @return a vector holding the result
[ "Divide", "this", "Vector3f", "component", "-", "wise", "by", "another", "Vector3fc", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3f.java#L655-L657
122,064
JOML-CI/JOML
src/org/joml/Quaternionf.java
Quaternionf.normalize
public Quaternionf normalize() { float invNorm = (float) (1.0 / Math.sqrt(x * x + y * y + z * z + w * w)); x *= invNorm; y *= invNorm; z *= invNorm; w *= invNorm; return this; }
java
public Quaternionf normalize() { float invNorm = (float) (1.0 / Math.sqrt(x * x + y * y + z * z + w * w)); x *= invNorm; y *= invNorm; z *= invNorm; w *= invNorm; return this; }
[ "public", "Quaternionf", "normalize", "(", ")", "{", "float", "invNorm", "=", "(", "float", ")", "(", "1.0", "/", "Math", ".", "sqrt", "(", "x", "*", "x", "+", "y", "*", "y", "+", "z", "*", "z", "+", "w", "*", "w", ")", ")", ";", "x", "*=",...
Normalize this quaternion. @return this
[ "Normalize", "this", "quaternion", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Quaternionf.java#L153-L160
122,065
JOML-CI/JOML
src/org/joml/Matrix3d.java
Matrix3d.set
public Matrix3d set(int column, int row, double value) { switch (column) { case 0: switch (row) { case 0: this.m00 = value; return this; case 1: this.m01 = value; return this; case 2: ...
java
public Matrix3d set(int column, int row, double value) { switch (column) { case 0: switch (row) { case 0: this.m00 = value; return this; case 1: this.m01 = value; return this; case 2: ...
[ "public", "Matrix3d", "set", "(", "int", "column", ",", "int", "row", ",", "double", "value", ")", "{", "switch", "(", "column", ")", "{", "case", "0", ":", "switch", "(", "row", ")", "{", "case", "0", ":", "this", ".", "m00", "=", "value", ";", ...
Set the matrix element at the given column and row to the specified value. @param column the colum index in <code>[0..2]</code> @param row the row index in <code>[0..2]</code> @param value the value @return this
[ "Set", "the", "matrix", "element", "at", "the", "given", "column", "and", "row", "to", "the", "specified", "value", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3d.java#L3689-L3740
122,066
JOML-CI/JOML
src/org/joml/AABBd.java
AABBd.correctBounds
public AABBd correctBounds() { double tmp; if (this.minX > this.maxX) { tmp = this.minX; this.minX = this.maxX; this.maxX = tmp; } if (this.minY > this.maxY) { tmp = this.minY; this.minY = this.maxY; this.maxY = tmp;...
java
public AABBd correctBounds() { double tmp; if (this.minX > this.maxX) { tmp = this.minX; this.minX = this.maxX; this.maxX = tmp; } if (this.minY > this.maxY) { tmp = this.minY; this.minY = this.maxY; this.maxY = tmp;...
[ "public", "AABBd", "correctBounds", "(", ")", "{", "double", "tmp", ";", "if", "(", "this", ".", "minX", ">", "this", ".", "maxX", ")", "{", "tmp", "=", "this", ".", "minX", ";", "this", ".", "minX", "=", "this", ".", "maxX", ";", "this", ".", ...
Ensure that the minimum coordinates are strictly less than or equal to the maximum coordinates by swapping them if necessary. @return this
[ "Ensure", "that", "the", "minimum", "coordinates", "are", "strictly", "less", "than", "or", "equal", "to", "the", "maximum", "coordinates", "by", "swapping", "them", "if", "necessary", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/AABBd.java#L262-L280
122,067
JOML-CI/JOML
src/org/joml/Vector3i.java
Vector3i.add
public Vector3i add(Vector3ic v) { return add(v.x(), v.y(), v.z(), thisOrNew()); }
java
public Vector3i add(Vector3ic v) { return add(v.x(), v.y(), v.z(), thisOrNew()); }
[ "public", "Vector3i", "add", "(", "Vector3ic", "v", ")", "{", "return", "add", "(", "v", ".", "x", "(", ")", ",", "v", ".", "y", "(", ")", ",", "v", ".", "z", "(", ")", ",", "thisOrNew", "(", ")", ")", ";", "}" ]
Add the supplied vector to this one. @param v the vector to add @return a vector holding the result
[ "Add", "the", "supplied", "vector", "to", "this", "one", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3i.java#L530-L532
122,068
JOML-CI/JOML
src/org/joml/Vector3i.java
Vector3i.mul
public Vector3i mul(int x, int y, int z) { return mul(x, y, z, thisOrNew()); }
java
public Vector3i mul(int x, int y, int z) { return mul(x, y, z, thisOrNew()); }
[ "public", "Vector3i", "mul", "(", "int", "x", ",", "int", "y", ",", "int", "z", ")", "{", "return", "mul", "(", "x", ",", "y", ",", "z", ",", "thisOrNew", "(", ")", ")", ";", "}" ]
Multiply the components of this vector by the given values. @param x the x component to multiply @param y the y component to multiply @param z the z component to multiply @return a vector holding the result
[ "Multiply", "the", "components", "of", "this", "vector", "by", "the", "given", "values", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3i.java#L623-L625
122,069
JOML-CI/JOML
src/org/joml/Vector3d.java
Vector3d.lengthSquared
public static double lengthSquared(double x, double y, double z) { return x * x + y * y + z * z; }
java
public static double lengthSquared(double x, double y, double z) { return x * x + y * y + z * z; }
[ "public", "static", "double", "lengthSquared", "(", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "return", "x", "*", "x", "+", "y", "*", "y", "+", "z", "*", "z", ";", "}" ]
Get the length squared of a 3-dimensional double-precision vector. @param x The vector's x component @param y The vector's y component @param z The vector's z component @return the length squared of the given vector @author F. Neurath
[ "Get", "the", "length", "squared", "of", "a", "3", "-", "dimensional", "double", "-", "precision", "vector", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3d.java#L1677-L1679
122,070
JOML-CI/JOML
src/org/joml/Vector4i.java
Vector4i.length
public static double length(int x, int y, int z, int w) { return Math.sqrt(lengthSquared(x, y, z, w)); }
java
public static double length(int x, int y, int z, int w) { return Math.sqrt(lengthSquared(x, y, z, w)); }
[ "public", "static", "double", "length", "(", "int", "x", ",", "int", "y", ",", "int", "z", ",", "int", "w", ")", "{", "return", "Math", ".", "sqrt", "(", "lengthSquared", "(", "x", ",", "y", ",", "z", ",", "w", ")", ")", ";", "}" ]
Get the length of a 4-dimensional single-precision vector. @param x The vector's x component @param y The vector's y component @param z The vector's z component @param w The vector's w component @return the length squared of the given vector
[ "Get", "the", "length", "of", "a", "4", "-", "dimensional", "single", "-", "precision", "vector", "." ]
ce2652fc236b42bda3875c591f8e6645048a678f
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector4i.java#L785-L787
122,071
akexorcist/Android-LocalizationActivity
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java
LocalizationActivityDelegate.onResume
public void onResume(final Context context) { new Handler().post(new Runnable() { @Override public void run() { checkLocaleChange(context); checkAfterLocaleChanging(); } }); }
java
public void onResume(final Context context) { new Handler().post(new Runnable() { @Override public void run() { checkLocaleChange(context); checkAfterLocaleChanging(); } }); }
[ "public", "void", "onResume", "(", "final", "Context", "context", ")", "{", "new", "Handler", "(", ")", ".", "post", "(", "new", "Runnable", "(", ")", "{", "@", "Override", "public", "void", "run", "(", ")", "{", "checkLocaleChange", "(", "context", ")...
If activity is run to back stack. So we have to check if this activity is resume working.
[ "If", "activity", "is", "run", "to", "back", "stack", ".", "So", "we", "have", "to", "check", "if", "this", "activity", "is", "resume", "working", "." ]
aa497325c349679b50b0b049fd1135e3617460d4
https://github.com/akexorcist/Android-LocalizationActivity/blob/aa497325c349679b50b0b049fd1135e3617460d4/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java#L50-L58
122,072
akexorcist/Android-LocalizationActivity
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java
LocalizationActivityDelegate.setLanguage
public final void setLanguage(Context context, String language) { Locale locale = new Locale(language); setLanguage(context, locale); }
java
public final void setLanguage(Context context, String language) { Locale locale = new Locale(language); setLanguage(context, locale); }
[ "public", "final", "void", "setLanguage", "(", "Context", "context", ",", "String", "language", ")", "{", "Locale", "locale", "=", "new", "Locale", "(", "language", ")", ";", "setLanguage", "(", "context", ",", "locale", ")", ";", "}" ]
Provide method to set application language by country name.
[ "Provide", "method", "to", "set", "application", "language", "by", "country", "name", "." ]
aa497325c349679b50b0b049fd1135e3617460d4
https://github.com/akexorcist/Android-LocalizationActivity/blob/aa497325c349679b50b0b049fd1135e3617460d4/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java#L97-L100
122,073
akexorcist/Android-LocalizationActivity
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java
LocalizationActivityDelegate.checkBeforeLocaleChanging
private void checkBeforeLocaleChanging() { boolean isLocalizationChanged = activity.getIntent().getBooleanExtra(KEY_ACTIVITY_LOCALE_CHANGED, false); if (isLocalizationChanged) { this.isLocalizationChanged = true; activity.getIntent().removeExtra(KEY_ACTIVITY_LOCALE_CHANGED); ...
java
private void checkBeforeLocaleChanging() { boolean isLocalizationChanged = activity.getIntent().getBooleanExtra(KEY_ACTIVITY_LOCALE_CHANGED, false); if (isLocalizationChanged) { this.isLocalizationChanged = true; activity.getIntent().removeExtra(KEY_ACTIVITY_LOCALE_CHANGED); ...
[ "private", "void", "checkBeforeLocaleChanging", "(", ")", "{", "boolean", "isLocalizationChanged", "=", "activity", ".", "getIntent", "(", ")", ".", "getBooleanExtra", "(", "KEY_ACTIVITY_LOCALE_CHANGED", ",", "false", ")", ";", "if", "(", "isLocalizationChanged", ")...
If yes, bundle will obe remove and set boolean flag to "true".
[ "If", "yes", "bundle", "will", "obe", "remove", "and", "set", "boolean", "flag", "to", "true", "." ]
aa497325c349679b50b0b049fd1135e3617460d4
https://github.com/akexorcist/Android-LocalizationActivity/blob/aa497325c349679b50b0b049fd1135e3617460d4/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java#L135-L141
122,074
akexorcist/Android-LocalizationActivity
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java
LocalizationActivityDelegate.setupLanguage
private void setupLanguage() { Locale locale = LanguageSetting.getLanguage(activity); setupLocale(locale); currentLanguage = locale; LanguageSetting.setLanguage(activity, locale); }
java
private void setupLanguage() { Locale locale = LanguageSetting.getLanguage(activity); setupLocale(locale); currentLanguage = locale; LanguageSetting.setLanguage(activity, locale); }
[ "private", "void", "setupLanguage", "(", ")", "{", "Locale", "locale", "=", "LanguageSetting", ".", "getLanguage", "(", "activity", ")", ";", "setupLocale", "(", "locale", ")", ";", "currentLanguage", "=", "locale", ";", "LanguageSetting", ".", "setLanguage", ...
This method will called before onCreate.
[ "This", "method", "will", "called", "before", "onCreate", "." ]
aa497325c349679b50b0b049fd1135e3617460d4
https://github.com/akexorcist/Android-LocalizationActivity/blob/aa497325c349679b50b0b049fd1135e3617460d4/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java#L145-L150
122,075
akexorcist/Android-LocalizationActivity
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java
LocalizationActivityDelegate.isCurrentLanguageSetting
private boolean isCurrentLanguageSetting(Context context, Locale locale) { return locale.toString().equals(LanguageSetting.getLanguage(context).toString()); }
java
private boolean isCurrentLanguageSetting(Context context, Locale locale) { return locale.toString().equals(LanguageSetting.getLanguage(context).toString()); }
[ "private", "boolean", "isCurrentLanguageSetting", "(", "Context", "context", ",", "Locale", "locale", ")", "{", "return", "locale", ".", "toString", "(", ")", ".", "equals", "(", "LanguageSetting", ".", "getLanguage", "(", "context", ")", ".", "toString", "(",...
Avoid duplicated setup
[ "Avoid", "duplicated", "setup" ]
aa497325c349679b50b0b049fd1135e3617460d4
https://github.com/akexorcist/Android-LocalizationActivity/blob/aa497325c349679b50b0b049fd1135e3617460d4/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java#L168-L170
122,076
akexorcist/Android-LocalizationActivity
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java
LocalizationActivityDelegate.notifyLanguageChanged
private void notifyLanguageChanged() { sendOnBeforeLocaleChangedEvent(); activity.getIntent().putExtra(KEY_ACTIVITY_LOCALE_CHANGED, true); callDummyActivity(); activity.recreate(); }
java
private void notifyLanguageChanged() { sendOnBeforeLocaleChangedEvent(); activity.getIntent().putExtra(KEY_ACTIVITY_LOCALE_CHANGED, true); callDummyActivity(); activity.recreate(); }
[ "private", "void", "notifyLanguageChanged", "(", ")", "{", "sendOnBeforeLocaleChangedEvent", "(", ")", ";", "activity", ".", "getIntent", "(", ")", ".", "putExtra", "(", "KEY_ACTIVITY_LOCALE_CHANGED", ",", "true", ")", ";", "callDummyActivity", "(", ")", ";", "a...
Let's take it change! (Using recreate method that available on API 11 or more.
[ "Let", "s", "take", "it", "change!", "(", "Using", "recreate", "method", "that", "available", "on", "API", "11", "or", "more", "." ]
aa497325c349679b50b0b049fd1135e3617460d4
https://github.com/akexorcist/Android-LocalizationActivity/blob/aa497325c349679b50b0b049fd1135e3617460d4/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java#L173-L178
122,077
akexorcist/Android-LocalizationActivity
localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java
LocalizationActivityDelegate.checkLocaleChange
private void checkLocaleChange(Context context) { if (!isCurrentLanguageSetting(context, currentLanguage)) { sendOnBeforeLocaleChangedEvent(); isLocalizationChanged = true; callDummyActivity(); activity.recreate(); } }
java
private void checkLocaleChange(Context context) { if (!isCurrentLanguageSetting(context, currentLanguage)) { sendOnBeforeLocaleChangedEvent(); isLocalizationChanged = true; callDummyActivity(); activity.recreate(); } }
[ "private", "void", "checkLocaleChange", "(", "Context", "context", ")", "{", "if", "(", "!", "isCurrentLanguageSetting", "(", "context", ",", "currentLanguage", ")", ")", "{", "sendOnBeforeLocaleChangedEvent", "(", ")", ";", "isLocalizationChanged", "=", "true", "...
Check if locale has change while this activity was run to back stack.
[ "Check", "if", "locale", "has", "change", "while", "this", "activity", "was", "run", "to", "back", "stack", "." ]
aa497325c349679b50b0b049fd1135e3617460d4
https://github.com/akexorcist/Android-LocalizationActivity/blob/aa497325c349679b50b0b049fd1135e3617460d4/localizationActivity/src/main/java/com/akexorcist/localizationactivity/core/LocalizationActivityDelegate.java#L181-L188
122,078
asciidoctor/asciidoctor-maven-plugin
src/main/java/org/asciidoctor/maven/io/AsciidoctorFileScanner.java
AsciidoctorFileScanner.scan
public List<File> scan(List<Resource> resources) { List<File> files = new ArrayList<File>(); for (Resource resource: resources) { files.addAll(scan(resource)); } return files; }
java
public List<File> scan(List<Resource> resources) { List<File> files = new ArrayList<File>(); for (Resource resource: resources) { files.addAll(scan(resource)); } return files; }
[ "public", "List", "<", "File", ">", "scan", "(", "List", "<", "Resource", ">", "resources", ")", "{", "List", "<", "File", ">", "files", "=", "new", "ArrayList", "<", "File", ">", "(", ")", ";", "for", "(", "Resource", "resource", ":", "resources", ...
Scans a list of resources returning all AsciiDoc documents found. @param resources List of {@link Resource} to scan (the directory property is mandatory) @return List of found documents matching the resources properties
[ "Scans", "a", "list", "of", "resources", "returning", "all", "AsciiDoc", "documents", "found", "." ]
880938df1c638aaabedb3c944cd3e0ea1844109e
https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/880938df1c638aaabedb3c944cd3e0ea1844109e/src/main/java/org/asciidoctor/maven/io/AsciidoctorFileScanner.java#L66-L72
122,079
asciidoctor/asciidoctor-maven-plugin
src/main/java/org/asciidoctor/maven/log/MemoryLogHandler.java
MemoryLogHandler.filter
public List<LogRecord> filter(Severity severity) { // FIXME: find better name or replace with stream final List<LogRecord> records = new ArrayList<>(); for (LogRecord record : this.records) { if (record.getSeverity().ordinal() >= severity.ordinal()) records.add(record...
java
public List<LogRecord> filter(Severity severity) { // FIXME: find better name or replace with stream final List<LogRecord> records = new ArrayList<>(); for (LogRecord record : this.records) { if (record.getSeverity().ordinal() >= severity.ordinal()) records.add(record...
[ "public", "List", "<", "LogRecord", ">", "filter", "(", "Severity", "severity", ")", "{", "// FIXME: find better name or replace with stream", "final", "List", "<", "LogRecord", ">", "records", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "LogRecord...
Returns LogRecords that are equal or above the severity level. @param severity Asciidoctor severity level @return list of filtered logRecords
[ "Returns", "LogRecords", "that", "are", "equal", "or", "above", "the", "severity", "level", "." ]
880938df1c638aaabedb3c944cd3e0ea1844109e
https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/880938df1c638aaabedb3c944cd3e0ea1844109e/src/main/java/org/asciidoctor/maven/log/MemoryLogHandler.java#L47-L55
122,080
asciidoctor/asciidoctor-maven-plugin
src/main/java/org/asciidoctor/maven/log/MemoryLogHandler.java
MemoryLogHandler.filter
public List<LogRecord> filter(String text) { final List<LogRecord> records = new ArrayList<>(); for (LogRecord record : this.records) { if (record.getMessage().contains(text)) records.add(record); } return records; }
java
public List<LogRecord> filter(String text) { final List<LogRecord> records = new ArrayList<>(); for (LogRecord record : this.records) { if (record.getMessage().contains(text)) records.add(record); } return records; }
[ "public", "List", "<", "LogRecord", ">", "filter", "(", "String", "text", ")", "{", "final", "List", "<", "LogRecord", ">", "records", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "LogRecord", "record", ":", "this", ".", "records", ")", ...
Returns LogRecords whose message contains text. @param text text to search for in the LogRecords @return list of filtered logRecords
[ "Returns", "LogRecords", "whose", "message", "contains", "text", "." ]
880938df1c638aaabedb3c944cd3e0ea1844109e
https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/880938df1c638aaabedb3c944cd3e0ea1844109e/src/main/java/org/asciidoctor/maven/log/MemoryLogHandler.java#L63-L70
122,081
asciidoctor/asciidoctor-maven-plugin
src/main/java/org/asciidoctor/maven/log/MemoryLogHandler.java
MemoryLogHandler.filter
public List<LogRecord> filter(Severity severity, String text) { final List<LogRecord> records = new ArrayList<>(); for (LogRecord record : this.records) { if (record.getSeverity().ordinal() >= severity.ordinal() && record.getMessage().contains(text)) records.add(record); ...
java
public List<LogRecord> filter(Severity severity, String text) { final List<LogRecord> records = new ArrayList<>(); for (LogRecord record : this.records) { if (record.getSeverity().ordinal() >= severity.ordinal() && record.getMessage().contains(text)) records.add(record); ...
[ "public", "List", "<", "LogRecord", ">", "filter", "(", "Severity", "severity", ",", "String", "text", ")", "{", "final", "List", "<", "LogRecord", ">", "records", "=", "new", "ArrayList", "<>", "(", ")", ";", "for", "(", "LogRecord", "record", ":", "t...
Returns LogRecords that are equal or above the severity level and whose message contains text. @param severity Asciidoctor severity level @param text text to search for in the LogRecords @return list of filtered logRecords
[ "Returns", "LogRecords", "that", "are", "equal", "or", "above", "the", "severity", "level", "and", "whose", "message", "contains", "text", "." ]
880938df1c638aaabedb3c944cd3e0ea1844109e
https://github.com/asciidoctor/asciidoctor-maven-plugin/blob/880938df1c638aaabedb3c944cd3e0ea1844109e/src/main/java/org/asciidoctor/maven/log/MemoryLogHandler.java#L79-L86
122,082
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.attach
public static SwipeBack attach(Activity activity, Type type, Position position, int dragMode) { return attach(activity, type, position, dragMode, new DefaultSwipeBackTransformer()); }
java
public static SwipeBack attach(Activity activity, Type type, Position position, int dragMode) { return attach(activity, type, position, dragMode, new DefaultSwipeBackTransformer()); }
[ "public", "static", "SwipeBack", "attach", "(", "Activity", "activity", ",", "Type", "type", ",", "Position", "position", ",", "int", "dragMode", ")", "{", "return", "attach", "(", "activity", ",", "type", ",", "position", ",", "dragMode", ",", "new", "Def...
Attaches the SwipeBack to the Activity @param activity @param type @param position @param dragMode The dragMode which is {@link #DRAG_CONTENT} or {@link #DRAG_WINDOW} @return The created SwipeBack instance
[ "Attaches", "the", "SwipeBack", "to", "the", "Activity" ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L469-L473
122,083
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.createSwipeBack
private static SwipeBack createSwipeBack(Activity activity, int dragMode, Position position, Type type, SwipeBackTransformer transformer) { SwipeBack drawerHelper; if (type == Type.OVERLAY) { drawerHelper = new OverlaySwipeBack(activity, dragMode); } else { drawerHelper = new SlidingSwipeBack(activity, ...
java
private static SwipeBack createSwipeBack(Activity activity, int dragMode, Position position, Type type, SwipeBackTransformer transformer) { SwipeBack drawerHelper; if (type == Type.OVERLAY) { drawerHelper = new OverlaySwipeBack(activity, dragMode); } else { drawerHelper = new SlidingSwipeBack(activity, ...
[ "private", "static", "SwipeBack", "createSwipeBack", "(", "Activity", "activity", ",", "int", "dragMode", ",", "Position", "position", ",", "Type", "type", ",", "SwipeBackTransformer", "transformer", ")", "{", "SwipeBack", "drawerHelper", ";", "if", "(", "type", ...
Constructs the appropriate SwipeBack based on the position.
[ "Constructs", "the", "appropriate", "SwipeBack", "based", "on", "the", "position", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L529-L553
122,084
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.isActivitiyDestroyed
@SuppressLint("NewApi") protected boolean isActivitiyDestroyed() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return mActivity.isFinishing() || mActivity.isDestroyed(); } else { return mActivity.isFinishing(); } }
java
@SuppressLint("NewApi") protected boolean isActivitiyDestroyed() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { return mActivity.isFinishing() || mActivity.isDestroyed(); } else { return mActivity.isFinishing(); } }
[ "@", "SuppressLint", "(", "\"NewApi\"", ")", "protected", "boolean", "isActivitiyDestroyed", "(", ")", "{", "if", "(", "Build", ".", "VERSION", ".", "SDK_INT", ">=", "Build", ".", "VERSION_CODES", ".", "JELLY_BEAN_MR1", ")", "{", "return", "mActivity", ".", ...
Determines if the activity has been destroyed or finished. This is useful to dertermine if a @return
[ "Determines", "if", "the", "activity", "has", "been", "destroyed", "or", "finished", ".", "This", "is", "useful", "to", "dertermine", "if", "a" ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L561-L570
122,085
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.attachToContent
private static void attachToContent(Activity activity, SwipeBack swipeBack) { /** * Do not call mActivity#setContentView. * E.g. if using with a ListActivity, Activity#setContentView is overridden and dispatched to * SwipeBack#setContentView, which then again would call Activity#setContentView. */ ViewG...
java
private static void attachToContent(Activity activity, SwipeBack swipeBack) { /** * Do not call mActivity#setContentView. * E.g. if using with a ListActivity, Activity#setContentView is overridden and dispatched to * SwipeBack#setContentView, which then again would call Activity#setContentView. */ ViewG...
[ "private", "static", "void", "attachToContent", "(", "Activity", "activity", ",", "SwipeBack", "swipeBack", ")", "{", "/**\n\t\t * Do not call mActivity#setContentView.\n\t\t * E.g. if using with a ListActivity, Activity#setContentView is overridden and dispatched to\n\t\t * SwipeBack#setCon...
Attaches the swipe back to the content view.
[ "Attaches", "the", "swipe", "back", "to", "the", "content", "view", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L632-L642
122,086
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.attachToDecor
private static void attachToDecor(Activity activity, SwipeBack swipeBack) { ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView(); ViewGroup decorChild = (ViewGroup) decorView.getChildAt(0); decorView.removeAllViews(); decorView.addView(swipeBack, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_P...
java
private static void attachToDecor(Activity activity, SwipeBack swipeBack) { ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView(); ViewGroup decorChild = (ViewGroup) decorView.getChildAt(0); decorView.removeAllViews(); decorView.addView(swipeBack, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_P...
[ "private", "static", "void", "attachToDecor", "(", "Activity", "activity", ",", "SwipeBack", "swipeBack", ")", "{", "ViewGroup", "decorView", "=", "(", "ViewGroup", ")", "activity", ".", "getWindow", "(", ")", ".", "getDecorView", "(", ")", ";", "ViewGroup", ...
Attaches the swipe back drawer to the window.
[ "Attaches", "the", "swipe", "back", "drawer", "to", "the", "window", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L647-L655
122,087
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.updateTouchAreaSize
protected void updateTouchAreaSize() { if (mTouchMode == TOUCH_MODE_BEZEL) { mTouchSize = mTouchBezelSize; } else if (mTouchMode == TOUCH_MODE_FULLSCREEN) { mTouchSize = getMeasuredWidth(); } else { mTouchSize = 0; } }
java
protected void updateTouchAreaSize() { if (mTouchMode == TOUCH_MODE_BEZEL) { mTouchSize = mTouchBezelSize; } else if (mTouchMode == TOUCH_MODE_FULLSCREEN) { mTouchSize = getMeasuredWidth(); } else { mTouchSize = 0; } }
[ "protected", "void", "updateTouchAreaSize", "(", ")", "{", "if", "(", "mTouchMode", "==", "TOUCH_MODE_BEZEL", ")", "{", "mTouchSize", "=", "mTouchBezelSize", ";", "}", "else", "if", "(", "mTouchMode", "==", "TOUCH_MODE_FULLSCREEN", ")", "{", "mTouchSize", "=", ...
Compute the touch area based on the touch mode.
[ "Compute", "the", "touch", "area", "based", "on", "the", "touch", "mode", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L1089-L1097
122,088
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.setDividerAsShadowColor
public SwipeBack setDividerAsShadowColor(int color) { GradientDrawable.Orientation orientation = getDividerOrientation(); final int endColor = color & 0x00FFFFFF; GradientDrawable gradient = new GradientDrawable(orientation, new int[] { color, endColor, }); setDivider(gradient); return this; ...
java
public SwipeBack setDividerAsShadowColor(int color) { GradientDrawable.Orientation orientation = getDividerOrientation(); final int endColor = color & 0x00FFFFFF; GradientDrawable gradient = new GradientDrawable(orientation, new int[] { color, endColor, }); setDivider(gradient); return this; ...
[ "public", "SwipeBack", "setDividerAsShadowColor", "(", "int", "color", ")", "{", "GradientDrawable", ".", "Orientation", "orientation", "=", "getDividerOrientation", "(", ")", ";", "final", "int", "endColor", "=", "color", "&", "0x00FFFFFF", ";", "GradientDrawable",...
Sets the color of the divider, if you have set the option to use a shadow gradient as divider You must enable the divider by calling {@link #setDividerEnabled(boolean)} @param color The color of the divider shadow.
[ "Sets", "the", "color", "of", "the", "divider", "if", "you", "have", "set", "the", "option", "to", "use", "a", "shadow", "gradient", "as", "divider" ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L1173-L1186
122,089
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/SwipeBack.java
SwipeBack.setSwipeBackView
public SwipeBack setSwipeBackView(int layoutResId) { mSwipeBackContainer.removeAllViews(); mSwipeBackView = LayoutInflater.from(getContext()).inflate(layoutResId, mSwipeBackContainer, false); mSwipeBackContainer.addView(mSwipeBackView); notifySwipeBackViewCreated(mSwipeBackView); return this; }
java
public SwipeBack setSwipeBackView(int layoutResId) { mSwipeBackContainer.removeAllViews(); mSwipeBackView = LayoutInflater.from(getContext()).inflate(layoutResId, mSwipeBackContainer, false); mSwipeBackContainer.addView(mSwipeBackView); notifySwipeBackViewCreated(mSwipeBackView); return this; }
[ "public", "SwipeBack", "setSwipeBackView", "(", "int", "layoutResId", ")", "{", "mSwipeBackContainer", ".", "removeAllViews", "(", ")", ";", "mSwipeBackView", "=", "LayoutInflater", ".", "from", "(", "getContext", "(", ")", ")", ".", "inflate", "(", "layoutResId...
Set the swipe back view from a layout resource. @param layoutResId Resource ID to be inflated.
[ "Set", "the", "swipe", "back", "view", "from", "a", "layout", "resource", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/SwipeBack.java#L1355-L1364
122,090
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/DraggableSwipeBack.java
DraggableSwipeBack.completeAnimation
private void completeAnimation() { mScroller.abortAnimation(); final int finalX = mScroller.getFinalX(); setOffsetPixels(finalX); setDrawerState(finalX == 0 ? STATE_CLOSED : STATE_OPEN); stopLayerTranslation(); }
java
private void completeAnimation() { mScroller.abortAnimation(); final int finalX = mScroller.getFinalX(); setOffsetPixels(finalX); setDrawerState(finalX == 0 ? STATE_CLOSED : STATE_OPEN); stopLayerTranslation(); }
[ "private", "void", "completeAnimation", "(", ")", "{", "mScroller", ".", "abortAnimation", "(", ")", ";", "final", "int", "finalX", "=", "mScroller", ".", "getFinalX", "(", ")", ";", "setOffsetPixels", "(", "finalX", ")", ";", "setDrawerState", "(", "finalX"...
Called when a drawer animation has successfully completed.
[ "Called", "when", "a", "drawer", "animation", "has", "successfully", "completed", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/DraggableSwipeBack.java#L350-L356
122,091
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/DraggableSwipeBack.java
DraggableSwipeBack.postAnimationInvalidate
@SuppressLint("NewApi") private void postAnimationInvalidate() { if (mScroller.computeScrollOffset()) { final int oldX = (int) mOffsetPixels; final int x = mScroller.getCurrX(); if (x != oldX) { setOffsetPixels(x); } if (x != mScroller.getFinalX()) { postOnAnimation(mDragRunnable); return...
java
@SuppressLint("NewApi") private void postAnimationInvalidate() { if (mScroller.computeScrollOffset()) { final int oldX = (int) mOffsetPixels; final int x = mScroller.getCurrX(); if (x != oldX) { setOffsetPixels(x); } if (x != mScroller.getFinalX()) { postOnAnimation(mDragRunnable); return...
[ "@", "SuppressLint", "(", "\"NewApi\"", ")", "private", "void", "postAnimationInvalidate", "(", ")", "{", "if", "(", "mScroller", ".", "computeScrollOffset", "(", ")", ")", "{", "final", "int", "oldX", "=", "(", "int", ")", "mOffsetPixels", ";", "final", "...
Callback when each frame in the drawer animation should be drawn.
[ "Callback", "when", "each", "frame", "in", "the", "drawer", "animation", "should", "be", "drawn", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/DraggableSwipeBack.java#L422-L438
122,092
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/DraggableSwipeBack.java
DraggableSwipeBack.peekDrawerInvalidate
@SuppressLint("NewApi") private void peekDrawerInvalidate() { if (mPeekScroller.computeScrollOffset()) { final int oldX = (int) mOffsetPixels; final int x = mPeekScroller.getCurrX(); if (x != oldX) { setOffsetPixels(x); } if (!mPeekScroller.isFinished()) { postOnAnimation(mPeekRunnable); ...
java
@SuppressLint("NewApi") private void peekDrawerInvalidate() { if (mPeekScroller.computeScrollOffset()) { final int oldX = (int) mOffsetPixels; final int x = mPeekScroller.getCurrX(); if (x != oldX) { setOffsetPixels(x); } if (!mPeekScroller.isFinished()) { postOnAnimation(mPeekRunnable); ...
[ "@", "SuppressLint", "(", "\"NewApi\"", ")", "private", "void", "peekDrawerInvalidate", "(", ")", "{", "if", "(", "mPeekScroller", ".", "computeScrollOffset", "(", ")", ")", "{", "final", "int", "oldX", "=", "(", "int", ")", "mOffsetPixels", ";", "final", ...
Callback when each frame in the peek drawer animation should be drawn.
[ "Callback", "when", "each", "frame", "in", "the", "peek", "drawer", "animation", "should", "be", "drawn", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/DraggableSwipeBack.java#L455-L480
122,093
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/Scroller.java
Scroller.computeScrollOffset
public boolean computeScrollOffset() { if (mFinished) { return false; } int timePassed = (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime); if (timePassed < mDuration) { switch (mMode) { case SCROLL_MODE: float x = time...
java
public boolean computeScrollOffset() { if (mFinished) { return false; } int timePassed = (int) (AnimationUtils.currentAnimationTimeMillis() - mStartTime); if (timePassed < mDuration) { switch (mMode) { case SCROLL_MODE: float x = time...
[ "public", "boolean", "computeScrollOffset", "(", ")", "{", "if", "(", "mFinished", ")", "{", "return", "false", ";", "}", "int", "timePassed", "=", "(", "int", ")", "(", "AnimationUtils", ".", "currentAnimationTimeMillis", "(", ")", "-", "mStartTime", ")", ...
Call this when you want to know the new location. If it returns true, the animation is not yet finished. loc will be altered to provide the new location.
[ "Call", "this", "when", "you", "want", "to", "know", "the", "new", "location", ".", "If", "it", "returns", "true", "the", "animation", "is", "not", "yet", "finished", ".", "loc", "will", "be", "altered", "to", "provide", "the", "new", "location", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/Scroller.java#L248-L299
122,094
sockeqwe/SwipeBack
library/src/com/hannesdorfmann/swipeback/Scroller.java
Scroller.startScroll
public void startScroll(int startX, int startY, int dx, int dy) { startScroll(startX, startY, dx, dy, DEFAULT_DURATION); }
java
public void startScroll(int startX, int startY, int dx, int dy) { startScroll(startX, startY, dx, dy, DEFAULT_DURATION); }
[ "public", "void", "startScroll", "(", "int", "startX", ",", "int", "startY", ",", "int", "dx", ",", "int", "dy", ")", "{", "startScroll", "(", "startX", ",", "startY", ",", "dx", ",", "dy", ",", "DEFAULT_DURATION", ")", ";", "}" ]
Start scrolling by providing a starting point and the distance to travel. The scroll will use the default value of 250 milliseconds for the duration. @param startX Starting horizontal scroll offset in pixels. Positive numbers will scroll the content to the left. @param startY Starting vertical scroll offset in pixels....
[ "Start", "scrolling", "by", "providing", "a", "starting", "point", "and", "the", "distance", "to", "travel", ".", "The", "scroll", "will", "use", "the", "default", "value", "of", "250", "milliseconds", "for", "the", "duration", "." ]
09ed11f48e930ed47fd4f07ad1c786fc9fff3c48
https://github.com/sockeqwe/SwipeBack/blob/09ed11f48e930ed47fd4f07ad1c786fc9fff3c48/library/src/com/hannesdorfmann/swipeback/Scroller.java#L315-L317
122,095
bguerout/jongo
src/main/java/org/jongo/query/BsonQueryFactory.java
BsonQueryFactory.marshallParameterAsPrimitive
private Object marshallParameterAsPrimitive(Object parameter) { Map<String, Object> primitiveWrapper = Collections.singletonMap("wrapped", parameter); BsonDocument document = marshaller.marshall(primitiveWrapper); return document.toDBObject().get("wrapped"); }
java
private Object marshallParameterAsPrimitive(Object parameter) { Map<String, Object> primitiveWrapper = Collections.singletonMap("wrapped", parameter); BsonDocument document = marshaller.marshall(primitiveWrapper); return document.toDBObject().get("wrapped"); }
[ "private", "Object", "marshallParameterAsPrimitive", "(", "Object", "parameter", ")", "{", "Map", "<", "String", ",", "Object", ">", "primitiveWrapper", "=", "Collections", ".", "singletonMap", "(", "\"wrapped\"", ",", "parameter", ")", ";", "BsonDocument", "docum...
The object may have been serialized to a primitive type with a custom serializer, so try again after wrapping as an object property. We do this trick only as a falllback since it causes Jackson to consider the parameter as "Object" and thus ignore any annotations that may exist on its actual class.
[ "The", "object", "may", "have", "been", "serialized", "to", "a", "primitive", "type", "with", "a", "custom", "serializer", "so", "try", "again", "after", "wrapping", "as", "an", "object", "property", ".", "We", "do", "this", "trick", "only", "as", "a", "...
316f9770889fbc078acd5ab38e7e1c571ee496b8
https://github.com/bguerout/jongo/blob/316f9770889fbc078acd5ab38e7e1c571ee496b8/src/main/java/org/jongo/query/BsonQueryFactory.java#L264-L268
122,096
Erudika/para
para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java
AWSDynamoUtils.getClient
public static AmazonDynamoDB getClient() { if (ddbClient != null) { return ddbClient; } if (Config.IN_PRODUCTION) { ddbClient = AmazonDynamoDBClientBuilder.standard().build(); } else { ddbClient = AmazonDynamoDBClientBuilder.standard(). withCredentials(new AWSStaticCredentialsProvider(new BasicAW...
java
public static AmazonDynamoDB getClient() { if (ddbClient != null) { return ddbClient; } if (Config.IN_PRODUCTION) { ddbClient = AmazonDynamoDBClientBuilder.standard().build(); } else { ddbClient = AmazonDynamoDBClientBuilder.standard(). withCredentials(new AWSStaticCredentialsProvider(new BasicAW...
[ "public", "static", "AmazonDynamoDB", "getClient", "(", ")", "{", "if", "(", "ddbClient", "!=", "null", ")", "{", "return", "ddbClient", ";", "}", "if", "(", "Config", ".", "IN_PRODUCTION", ")", "{", "ddbClient", "=", "AmazonDynamoDBClientBuilder", ".", "sta...
Returns a client instance for AWS DynamoDB. @return a client that talks to DynamoDB
[ "Returns", "a", "client", "instance", "for", "AWS", "DynamoDB", "." ]
5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java#L105-L131
122,097
Erudika/para
para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java
AWSDynamoUtils.existsTable
public static boolean existsTable(String appid) { if (StringUtils.isBlank(appid)) { return false; } try { DescribeTableResult res = getClient().describeTable(getTableNameForAppid(appid)); return res != null; } catch (Exception e) { return false; } }
java
public static boolean existsTable(String appid) { if (StringUtils.isBlank(appid)) { return false; } try { DescribeTableResult res = getClient().describeTable(getTableNameForAppid(appid)); return res != null; } catch (Exception e) { return false; } }
[ "public", "static", "boolean", "existsTable", "(", "String", "appid", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "appid", ")", ")", "{", "return", "false", ";", "}", "try", "{", "DescribeTableResult", "res", "=", "getClient", "(", ")", ".",...
Checks if the main table exists in the database. @param appid name of the {@link com.erudika.para.core.App} @return true if the table exists
[ "Checks", "if", "the", "main", "table", "exists", "in", "the", "database", "." ]
5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java#L151-L161
122,098
Erudika/para
para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java
AWSDynamoUtils.createTable
public static boolean createTable(String appid, long readCapacity, long writeCapacity) { if (StringUtils.isBlank(appid)) { return false; } else if (StringUtils.containsWhitespace(appid)) { logger.warn("DynamoDB table name contains whitespace. The name '{}' is invalid.", appid); return false; } else if (e...
java
public static boolean createTable(String appid, long readCapacity, long writeCapacity) { if (StringUtils.isBlank(appid)) { return false; } else if (StringUtils.containsWhitespace(appid)) { logger.warn("DynamoDB table name contains whitespace. The name '{}' is invalid.", appid); return false; } else if (e...
[ "public", "static", "boolean", "createTable", "(", "String", "appid", ",", "long", "readCapacity", ",", "long", "writeCapacity", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "appid", ")", ")", "{", "return", "false", ";", "}", "else", "if", "...
Creates a table in AWS DynamoDB. @param appid name of the {@link com.erudika.para.core.App} @param readCapacity read capacity @param writeCapacity write capacity @return true if created
[ "Creates", "a", "table", "in", "AWS", "DynamoDB", "." ]
5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java#L179-L202
122,099
Erudika/para
para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java
AWSDynamoUtils.deleteTable
public static boolean deleteTable(String appid) { if (StringUtils.isBlank(appid) || !existsTable(appid)) { return false; } try { String table = getTableNameForAppid(appid); getClient().deleteTable(new DeleteTableRequest().withTableName(table)); logger.info("Deleted DynamoDB table '{}'.", table); } c...
java
public static boolean deleteTable(String appid) { if (StringUtils.isBlank(appid) || !existsTable(appid)) { return false; } try { String table = getTableNameForAppid(appid); getClient().deleteTable(new DeleteTableRequest().withTableName(table)); logger.info("Deleted DynamoDB table '{}'.", table); } c...
[ "public", "static", "boolean", "deleteTable", "(", "String", "appid", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "appid", ")", "||", "!", "existsTable", "(", "appid", ")", ")", "{", "return", "false", ";", "}", "try", "{", "String", "tabl...
Deletes the main table from AWS DynamoDB. @param appid name of the {@link com.erudika.para.core.App} @return true if deleted
[ "Deletes", "the", "main", "table", "from", "AWS", "DynamoDB", "." ]
5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/persistence/AWSDynamoUtils.java#L233-L246