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
partition
stringclasses
1 value
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingLeft
public AT_Row setPaddingLeft(int paddingLeft) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeft(paddingLeft); } } return this; }
java
public AT_Row setPaddingLeft(int paddingLeft) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeft(paddingLeft); } } return this; }
[ "public", "AT_Row", "setPaddingLeft", "(", "int", "paddingLeft", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", "(", ")", ...
Sets the left padding for all cells in the row. @param paddingLeft new padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "the", "left", "padding", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L171-L178
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingLeftChar
public AT_Row setPaddingLeftChar(Character paddingLeftChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeftChar(paddingLeftChar); } } return this; }
java
public AT_Row setPaddingLeftChar(Character paddingLeftChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeftChar(paddingLeftChar); } } return this; }
[ "public", "AT_Row", "setPaddingLeftChar", "(", "Character", "paddingLeftChar", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", ...
Sets the left padding character for all cells in the row. @param paddingLeftChar new padding character, ignored if null @return this to allow chaining
[ "Sets", "the", "left", "padding", "character", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L185-L192
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingLeftRight
public AT_Row setPaddingLeftRight(int padding){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeftRight(padding); } } return this; }
java
public AT_Row setPaddingLeftRight(int padding){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingLeftRight(padding); } } return this; }
[ "public", "AT_Row", "setPaddingLeftRight", "(", "int", "padding", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", "(", ")", ...
Sets left and right padding for all cells in the row. @param padding new padding for left and right, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "left", "and", "right", "padding", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L199-L206
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingRight
public AT_Row setPaddingRight(int paddingRight) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingRight(paddingRight); } } return this; }
java
public AT_Row setPaddingRight(int paddingRight) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingRight(paddingRight); } } return this; }
[ "public", "AT_Row", "setPaddingRight", "(", "int", "paddingRight", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", "(", ")",...
Sets the right padding for all cells in the row. @param paddingRight new padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "the", "right", "padding", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L228-L235
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingRightChar
public AT_Row setPaddingRightChar(Character paddingRightChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingRightChar(paddingRightChar); } } return this; }
java
public AT_Row setPaddingRightChar(Character paddingRightChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingRightChar(paddingRightChar); } } return this; }
[ "public", "AT_Row", "setPaddingRightChar", "(", "Character", "paddingRightChar", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext",...
Sets the right padding character for all cells in the row. @param paddingRightChar new padding character, ignored if null @return this to allow chaining
[ "Sets", "the", "right", "padding", "character", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L242-L249
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingTop
public AT_Row setPaddingTop(int paddingTop) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingTop(paddingTop); } } return this; }
java
public AT_Row setPaddingTop(int paddingTop) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingTop(paddingTop); } } return this; }
[ "public", "AT_Row", "setPaddingTop", "(", "int", "paddingTop", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", "(", ")", "...
Sets the top padding for all cells in the row. @param paddingTop new padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "the", "top", "padding", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L256-L263
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingTopBottom
public AT_Row setPaddingTopBottom(int padding){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingTopBottom(padding); } } return this; }
java
public AT_Row setPaddingTopBottom(int padding){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingTopBottom(padding); } } return this; }
[ "public", "AT_Row", "setPaddingTopBottom", "(", "int", "padding", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", "(", ")", ...
Sets top and bottom padding for all cells in the row. @param padding new padding for top and bottom, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "top", "and", "bottom", "padding", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L270-L277
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setPaddingTopChar
public AT_Row setPaddingTopChar(Character paddingTopChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingTopChar(paddingTopChar); } } return this; }
java
public AT_Row setPaddingTopChar(Character paddingTopChar) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setPaddingTopChar(paddingTopChar); } } return this; }
[ "public", "AT_Row", "setPaddingTopChar", "(", "Character", "paddingTopChar", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", "...
Sets the top padding character for all cells in the row. @param paddingTopChar new padding character, ignored if null @return this to allow chaining
[ "Sets", "the", "top", "padding", "character", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L299-L306
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setTextAlignment
public AT_Row setTextAlignment(TextAlignment textAlignment){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setTextAlignment(textAlignment); } } return this; }
java
public AT_Row setTextAlignment(TextAlignment textAlignment){ if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setTextAlignment(textAlignment); } } return this; }
[ "public", "AT_Row", "setTextAlignment", "(", "TextAlignment", "textAlignment", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getContext", ...
Sets the text alignment for all cells in the row. @param textAlignment new text alignment @throws NullPointerException if the argument was null @return this to allow chaining @throws {@link NullPointerException} if the argument was null
[ "Sets", "the", "text", "alignment", "for", "all", "cells", "in", "the", "row", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L315-L322
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setTargetTranslator
public AT_Row setTargetTranslator(TargetTranslator targetTranslator) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setTargetTranslator(targetTranslator); } } return this; }
java
public AT_Row setTargetTranslator(TargetTranslator targetTranslator) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setTargetTranslator(targetTranslator); } } return this; }
[ "public", "AT_Row", "setTargetTranslator", "(", "TargetTranslator", "targetTranslator", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getCo...
Sets the target translator for all cells in the row. It will also remove any other translator set. Nothing will happen if the argument is null. @param targetTranslator translator @return this to allow chaining
[ "Sets", "the", "target", "translator", "for", "all", "cells", "in", "the", "row", ".", "It", "will", "also", "remove", "any", "other", "translator", "set", ".", "Nothing", "will", "happen", "if", "the", "argument", "is", "null", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L331-L338
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setHtmlElementTranslator
public AT_Row setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setHtmlElementTranslator(htmlElementTranslator); } } return this; }
java
public AT_Row setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setHtmlElementTranslator(htmlElementTranslator); } } return this; }
[ "public", "AT_Row", "setHtmlElementTranslator", "(", "HtmlElementTranslator", "htmlElementTranslator", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ...
Sets the HTML entity translator for all cells in the row. It will also remove any other translator set. Nothing will happen if the argument is null. @param htmlElementTranslator translator @return this to allow chaining
[ "Sets", "the", "HTML", "entity", "translator", "for", "all", "cells", "in", "the", "row", ".", "It", "will", "also", "remove", "any", "other", "translator", "set", ".", "Nothing", "will", "happen", "if", "the", "argument", "is", "null", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L347-L354
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Row.java
AT_Row.setCharTranslator
public AT_Row setCharTranslator(CharacterTranslator charTranslator) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setCharTranslator(charTranslator); } } return this; }
java
public AT_Row setCharTranslator(CharacterTranslator charTranslator) { if(this.hasCells()){ for(AT_Cell cell : this.getCells()){ cell.getContext().setCharTranslator(charTranslator); } } return this; }
[ "public", "AT_Row", "setCharTranslator", "(", "CharacterTranslator", "charTranslator", ")", "{", "if", "(", "this", ".", "hasCells", "(", ")", ")", "{", "for", "(", "AT_Cell", "cell", ":", "this", ".", "getCells", "(", ")", ")", "{", "cell", ".", "getCon...
Sets the character translator for all cells in the row. It will also remove any other translator set. Nothing will happen if the argument is null. @param charTranslator translator @return this to allow chaining
[ "Sets", "the", "character", "translator", "for", "all", "cells", "in", "the", "row", ".", "It", "will", "also", "remove", "any", "other", "translator", "set", ".", "Nothing", "will", "happen", "if", "the", "argument", "is", "null", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Row.java#L363-L370
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Context.java
AT_Context.setFrameLeftRightMargin
public AT_Context setFrameLeftRightMargin(int frameLeft, int frameRight){ if(frameRight>-1 && frameLeft>-1){ this.frameLeftMargin = frameLeft; this.frameRightMargin = frameRight; } return this; }
java
public AT_Context setFrameLeftRightMargin(int frameLeft, int frameRight){ if(frameRight>-1 && frameLeft>-1){ this.frameLeftMargin = frameLeft; this.frameRightMargin = frameRight; } return this; }
[ "public", "AT_Context", "setFrameLeftRightMargin", "(", "int", "frameLeft", ",", "int", "frameRight", ")", "{", "if", "(", "frameRight", ">", "-", "1", "&&", "frameLeft", ">", "-", "1", ")", "{", "this", ".", "frameLeftMargin", "=", "frameLeft", ";", "this...
Sets the left and right frame margin. @param frameLeft margin @param frameRight margin @return this to allow chaining
[ "Sets", "the", "left", "and", "right", "frame", "margin", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Context.java#L243-L249
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AT_Context.java
AT_Context.setFrameTopBottomMargin
public AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom){ if(frameTop>-1 && frameBottom>-1){ this.frameTopMargin = frameTop; this.frameBottomMargin = frameBottom; } return this; }
java
public AT_Context setFrameTopBottomMargin(int frameTop, int frameBottom){ if(frameTop>-1 && frameBottom>-1){ this.frameTopMargin = frameTop; this.frameBottomMargin = frameBottom; } return this; }
[ "public", "AT_Context", "setFrameTopBottomMargin", "(", "int", "frameTop", ",", "int", "frameBottom", ")", "{", "if", "(", "frameTop", ">", "-", "1", "&&", "frameBottom", ">", "-", "1", ")", "{", "this", ".", "frameTopMargin", "=", "frameTop", ";", "this",...
Sets the top and bottom frame margin. @param frameTop margin @param frameBottom margin @return this to allow chaining
[ "Sets", "the", "top", "and", "bottom", "frame", "margin", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AT_Context.java#L294-L300
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.addRule
public final void addRule(TableRowStyle style){ Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN, "cannot add a rule of unknown style"); this.rows.add(AT_Row.createRule(TableRowType.RULE, style)); }
java
public final void addRule(TableRowStyle style){ Validate.notNull(style); Validate.validState(style!=TableRowStyle.UNKNOWN, "cannot add a rule of unknown style"); this.rows.add(AT_Row.createRule(TableRowType.RULE, style)); }
[ "public", "final", "void", "addRule", "(", "TableRowStyle", "style", ")", "{", "Validate", ".", "notNull", "(", "style", ")", ";", "Validate", ".", "validState", "(", "style", "!=", "TableRowStyle", ".", "UNKNOWN", ",", "\"cannot add a rule of unknown style\"", ...
Adds a rule row to the table with a given style. @param style the rule style, must not be null nor {@link TableRowStyle#UNKNOWN} @throws {@link NullPointerException} if style was null @throws {@link IllegalArgumentException} if style was {@link TableRowStyle#UNKNOWN}
[ "Adds", "a", "rule", "row", "to", "the", "table", "with", "a", "given", "style", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L130-L134
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingBottom
public AsciiTable setPaddingBottom(int paddingBottom) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingBottom(paddingBottom); } } return this; }
java
public AsciiTable setPaddingBottom(int paddingBottom) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingBottom(paddingBottom); } } return this; }
[ "public", "AsciiTable", "setPaddingBottom", "(", "int", "paddingBottom", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row", ".", ...
Sets the bottom padding for all cells in the table. @param paddingBottom new padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "the", "bottom", "padding", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L258-L265
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingBottomChar
public AsciiTable setPaddingBottomChar(Character paddingBottomChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingBottomChar(paddingBottomChar); } } return this; }
java
public AsciiTable setPaddingBottomChar(Character paddingBottomChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingBottomChar(paddingBottomChar); } } return this; }
[ "public", "AsciiTable", "setPaddingBottomChar", "(", "Character", "paddingBottomChar", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", ...
Sets the bottom padding character for all cells in the table. @param paddingBottomChar new padding character, ignored if null @return this to allow chaining
[ "Sets", "the", "bottom", "padding", "character", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L272-L279
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingLeft
public AsciiTable setPaddingLeft(int paddingLeft) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingLeft(paddingLeft); } } return this; }
java
public AsciiTable setPaddingLeft(int paddingLeft) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingLeft(paddingLeft); } } return this; }
[ "public", "AsciiTable", "setPaddingLeft", "(", "int", "paddingLeft", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row", ".", "s...
Sets the left padding for all cells in the table. @param paddingLeft new padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "the", "left", "padding", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L286-L293
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingLeftChar
public AsciiTable setPaddingLeftChar(Character paddingLeftChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingLeftChar(paddingLeftChar); } } return this; }
java
public AsciiTable setPaddingLeftChar(Character paddingLeftChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingLeftChar(paddingLeftChar); } } return this; }
[ "public", "AsciiTable", "setPaddingLeftChar", "(", "Character", "paddingLeftChar", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row...
Sets the left padding character for all cells in the table. @param paddingLeftChar new padding character, ignored if null @return this to allow chaining
[ "Sets", "the", "left", "padding", "character", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L300-L307
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingLeftRight
public AsciiTable setPaddingLeftRight(int padding){ for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingLeftRight(padding); } } return this; }
java
public AsciiTable setPaddingLeftRight(int padding){ for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingLeftRight(padding); } } return this; }
[ "public", "AsciiTable", "setPaddingLeftRight", "(", "int", "padding", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row", ".", "...
Sets left and right padding for all cells in the table. @param padding new padding for left and right, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "left", "and", "right", "padding", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L314-L321
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingRight
public AsciiTable setPaddingRight(int paddingRight) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingRight(paddingRight); } } return this; }
java
public AsciiTable setPaddingRight(int paddingRight) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingRight(paddingRight); } } return this; }
[ "public", "AsciiTable", "setPaddingRight", "(", "int", "paddingRight", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row", ".", ...
Sets the right padding for all cells in the table. @param paddingRight new padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "the", "right", "padding", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L343-L350
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingRightChar
public AsciiTable setPaddingRightChar(Character paddingRightChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingRightChar(paddingRightChar); } } return this; }
java
public AsciiTable setPaddingRightChar(Character paddingRightChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingRightChar(paddingRightChar); } } return this; }
[ "public", "AsciiTable", "setPaddingRightChar", "(", "Character", "paddingRightChar", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "r...
Sets the right padding character for all cells in the table. @param paddingRightChar new padding character, ignored if null @return this to allow chaining
[ "Sets", "the", "right", "padding", "character", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L357-L364
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingTop
public AsciiTable setPaddingTop(int paddingTop) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingTop(paddingTop); } } return this; }
java
public AsciiTable setPaddingTop(int paddingTop) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingTop(paddingTop); } } return this; }
[ "public", "AsciiTable", "setPaddingTop", "(", "int", "paddingTop", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row", ".", "set...
Sets the top padding for all cells in the table. @param paddingTop new padding, ignored if smaller than 0 @return this to allow chaining
[ "Sets", "the", "top", "padding", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L371-L378
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setPaddingTopChar
public AsciiTable setPaddingTopChar(Character paddingTopChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingTopChar(paddingTopChar); } } return this; }
java
public AsciiTable setPaddingTopChar(Character paddingTopChar) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setPaddingTopChar(paddingTopChar); } } return this; }
[ "public", "AsciiTable", "setPaddingTopChar", "(", "Character", "paddingTopChar", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row",...
Sets the top padding character for all cells in the table. @param paddingTopChar new padding character, ignored if null @return this to allow chaining
[ "Sets", "the", "top", "padding", "character", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L414-L421
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setTextAlignment
public AsciiTable setTextAlignment(TextAlignment textAlignment){ for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setTextAlignment(textAlignment); } } return this; }
java
public AsciiTable setTextAlignment(TextAlignment textAlignment){ for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setTextAlignment(textAlignment); } } return this; }
[ "public", "AsciiTable", "setTextAlignment", "(", "TextAlignment", "textAlignment", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{", "row...
Sets the text alignment for all cells in the table. @param textAlignment new text alignment @throws NullPointerException if the argument was null @return this to allow chaining @throws {@link NullPointerException} if the argument was null
[ "Sets", "the", "text", "alignment", "for", "all", "cells", "in", "the", "table", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L430-L437
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setTargetTranslator
public AsciiTable setTargetTranslator(TargetTranslator targetTranslator) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setTargetTranslator(targetTranslator); } } return this; }
java
public AsciiTable setTargetTranslator(TargetTranslator targetTranslator) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setTargetTranslator(targetTranslator); } } return this; }
[ "public", "AsciiTable", "setTargetTranslator", "(", "TargetTranslator", "targetTranslator", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{...
Sets the target translator for all cells in the table. It will also remove any other translator set. Nothing will happen if the argument is null. @param targetTranslator translator @return this to allow chaining
[ "Sets", "the", "target", "translator", "for", "all", "cells", "in", "the", "table", ".", "It", "will", "also", "remove", "any", "other", "translator", "set", ".", "Nothing", "will", "happen", "if", "the", "argument", "is", "null", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L446-L453
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setHtmlElementTranslator
public AsciiTable setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setHtmlElementTranslator(htmlElementTranslator); } } return this; }
java
public AsciiTable setHtmlElementTranslator(HtmlElementTranslator htmlElementTranslator) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setHtmlElementTranslator(htmlElementTranslator); } } return this; }
[ "public", "AsciiTable", "setHtmlElementTranslator", "(", "HtmlElementTranslator", "htmlElementTranslator", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTEN...
Sets the HTML entity translator for all cells in the table. It will also remove any other translator set. Nothing will happen if the argument is null. @param htmlElementTranslator translator @return this to allow chaining
[ "Sets", "the", "HTML", "entity", "translator", "for", "all", "cells", "in", "the", "table", ".", "It", "will", "also", "remove", "any", "other", "translator", "set", ".", "Nothing", "will", "happen", "if", "the", "argument", "is", "null", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L462-L469
train
vdmeer/asciitable
src/main/java/de/vandermeer/asciitable/AsciiTable.java
AsciiTable.setCharTranslator
public AsciiTable setCharTranslator(CharacterTranslator charTranslator) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setCharTranslator(charTranslator); } } return this; }
java
public AsciiTable setCharTranslator(CharacterTranslator charTranslator) { for(AT_Row row : this.rows){ if(row.getType()==TableRowType.CONTENT){ row.setCharTranslator(charTranslator); } } return this; }
[ "public", "AsciiTable", "setCharTranslator", "(", "CharacterTranslator", "charTranslator", ")", "{", "for", "(", "AT_Row", "row", ":", "this", ".", "rows", ")", "{", "if", "(", "row", ".", "getType", "(", ")", "==", "TableRowType", ".", "CONTENT", ")", "{"...
Sets the character translator for all cells in the table. It will also remove any other translator set. Nothing will happen if the argument is null. @param charTranslator translator @return this to allow chaining
[ "Sets", "the", "character", "translator", "for", "all", "cells", "in", "the", "table", ".", "It", "will", "also", "remove", "any", "other", "translator", "set", ".", "Nothing", "will", "happen", "if", "the", "argument", "is", "null", "." ]
b6a73710271c89f9c749603be856ba84a969ed5f
https://github.com/vdmeer/asciitable/blob/b6a73710271c89f9c749603be856ba84a969ed5f/src/main/java/de/vandermeer/asciitable/AsciiTable.java#L478-L485
train
square/pollexor
src/main/java/com/squareup/pollexor/Utilities.java
Utilities.base64Encode
public static String base64Encode(byte[] bytes) { if (bytes == null) { throw new IllegalArgumentException("Input bytes must not be null."); } if (bytes.length >= BASE64_UPPER_BOUND) { throw new IllegalArgumentException( "Input bytes length must not exceed " + BASE64_UPPER_BOUND); } // Every three bytes is encoded into four characters. // // Example: // input |0 1 0 1 0 0 1 0|0 1 1 0 1 1 1 1|0 1 1 0 0 0 1 0| // encode grouping |0 1 0 1 0 0|1 0 0 1 1 0|1 1 1 1 0 1|1 0 0 0 1 0| // encoded ascii | U | m | 9 | i | int triples = bytes.length / 3; // If the number of input bytes is not a multiple of three, padding characters will be added. if (bytes.length % 3 != 0) { triples += 1; } // The encoded string will have four characters for every three bytes. char[] encoding = new char[triples << 2]; for (int in = 0, out = 0; in < bytes.length; in += 3, out += 4) { int triple = (bytes[in] & 0xff) << 16; if (in + 1 < bytes.length) { triple |= ((bytes[in + 1] & 0xff) << 8); } if (in + 2 < bytes.length) { triple |= (bytes[in + 2] & 0xff); } encoding[out] = BASE64_CHARS.charAt((triple >> 18) & 0x3f); encoding[out + 1] = BASE64_CHARS.charAt((triple >> 12) & 0x3f); encoding[out + 2] = BASE64_CHARS.charAt((triple >> 6) & 0x3f); encoding[out + 3] = BASE64_CHARS.charAt(triple & 0x3f); } // Add padding characters if needed. for (int i = encoding.length - (triples * 3 - bytes.length); i < encoding.length; i++) { encoding[i] = '='; } return String.valueOf(encoding); }
java
public static String base64Encode(byte[] bytes) { if (bytes == null) { throw new IllegalArgumentException("Input bytes must not be null."); } if (bytes.length >= BASE64_UPPER_BOUND) { throw new IllegalArgumentException( "Input bytes length must not exceed " + BASE64_UPPER_BOUND); } // Every three bytes is encoded into four characters. // // Example: // input |0 1 0 1 0 0 1 0|0 1 1 0 1 1 1 1|0 1 1 0 0 0 1 0| // encode grouping |0 1 0 1 0 0|1 0 0 1 1 0|1 1 1 1 0 1|1 0 0 0 1 0| // encoded ascii | U | m | 9 | i | int triples = bytes.length / 3; // If the number of input bytes is not a multiple of three, padding characters will be added. if (bytes.length % 3 != 0) { triples += 1; } // The encoded string will have four characters for every three bytes. char[] encoding = new char[triples << 2]; for (int in = 0, out = 0; in < bytes.length; in += 3, out += 4) { int triple = (bytes[in] & 0xff) << 16; if (in + 1 < bytes.length) { triple |= ((bytes[in + 1] & 0xff) << 8); } if (in + 2 < bytes.length) { triple |= (bytes[in + 2] & 0xff); } encoding[out] = BASE64_CHARS.charAt((triple >> 18) & 0x3f); encoding[out + 1] = BASE64_CHARS.charAt((triple >> 12) & 0x3f); encoding[out + 2] = BASE64_CHARS.charAt((triple >> 6) & 0x3f); encoding[out + 3] = BASE64_CHARS.charAt(triple & 0x3f); } // Add padding characters if needed. for (int i = encoding.length - (triples * 3 - bytes.length); i < encoding.length; i++) { encoding[i] = '='; } return String.valueOf(encoding); }
[ "public", "static", "String", "base64Encode", "(", "byte", "[", "]", "bytes", ")", "{", "if", "(", "bytes", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Input bytes must not be null.\"", ")", ";", "}", "if", "(", "bytes", ".", ...
Base64 encodes a byte array. @param bytes Bytes to encode. @return Encoded string. @throws IllegalArgumentException if {@code bytes} is null or exceeds 3/4ths of {@code Integer.MAX_VALUE}.
[ "Base64", "encodes", "a", "byte", "array", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/Utilities.java#L27-L73
train
square/pollexor
src/main/java/com/squareup/pollexor/Utilities.java
Utilities.md5
static String md5(String input) { if (input == null || input.length() == 0) { throw new IllegalArgumentException("Input string must not be blank."); } try { MessageDigest algorithm = MessageDigest.getInstance("MD5"); algorithm.reset(); algorithm.update(input.getBytes()); byte[] messageDigest = algorithm.digest(); StringBuilder hexString = new StringBuilder(); for (byte messageByte : messageDigest) { hexString.append(Integer.toHexString((messageByte & 0xFF) | 0x100).substring(1, 3)); } return hexString.toString(); } catch (Exception e) { throw new RuntimeException(e); } }
java
static String md5(String input) { if (input == null || input.length() == 0) { throw new IllegalArgumentException("Input string must not be blank."); } try { MessageDigest algorithm = MessageDigest.getInstance("MD5"); algorithm.reset(); algorithm.update(input.getBytes()); byte[] messageDigest = algorithm.digest(); StringBuilder hexString = new StringBuilder(); for (byte messageByte : messageDigest) { hexString.append(Integer.toHexString((messageByte & 0xFF) | 0x100).substring(1, 3)); } return hexString.toString(); } catch (Exception e) { throw new RuntimeException(e); } }
[ "static", "String", "md5", "(", "String", "input", ")", "{", "if", "(", "input", "==", "null", "||", "input", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Input string must not be blank.\"", ")", ";", "}...
Create an MD5 hash of a string. @param input Input string. @return Hash of input. @throws IllegalArgumentException if {@code input} is blank.
[ "Create", "an", "MD5", "hash", "of", "a", "string", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/Utilities.java#L134-L152
train
square/pollexor
src/main/java/com/squareup/pollexor/Utilities.java
Utilities.hmacSha1
static byte[] hmacSha1(StringBuilder message, String key) { try { Mac mac = Mac.getInstance("HmacSHA1"); mac.init(new SecretKeySpec(key.getBytes(), "HmacSHA1")); return mac.doFinal(message.toString().getBytes()); } catch (Exception e) { throw new RuntimeException(e); } }
java
static byte[] hmacSha1(StringBuilder message, String key) { try { Mac mac = Mac.getInstance("HmacSHA1"); mac.init(new SecretKeySpec(key.getBytes(), "HmacSHA1")); return mac.doFinal(message.toString().getBytes()); } catch (Exception e) { throw new RuntimeException(e); } }
[ "static", "byte", "[", "]", "hmacSha1", "(", "StringBuilder", "message", ",", "String", "key", ")", "{", "try", "{", "Mac", "mac", "=", "Mac", ".", "getInstance", "(", "\"HmacSHA1\"", ")", ";", "mac", ".", "init", "(", "new", "SecretKeySpec", "(", "key...
Encrypt a string with HMAC-SHA1 using the specified key. @param message Input string. @param key Encryption key. @return Encrypted output.
[ "Encrypt", "a", "string", "with", "HMAC", "-", "SHA1", "using", "the", "specified", "key", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/Utilities.java#L161-L169
train
square/pollexor
src/main/java/com/squareup/pollexor/Utilities.java
Utilities.aes128Encrypt
@SuppressWarnings("InsecureCryptoUsage") // Only used in known-weak crypto "legacy" mode. static byte[] aes128Encrypt(StringBuilder message, String key) { try { key = normalizeString(key, 16); rightPadString(message, '{', 16); Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key.getBytes(), "AES")); return cipher.doFinal(message.toString().getBytes()); } catch (Exception e) { throw new RuntimeException(e); } }
java
@SuppressWarnings("InsecureCryptoUsage") // Only used in known-weak crypto "legacy" mode. static byte[] aes128Encrypt(StringBuilder message, String key) { try { key = normalizeString(key, 16); rightPadString(message, '{', 16); Cipher cipher = Cipher.getInstance("AES/ECB/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key.getBytes(), "AES")); return cipher.doFinal(message.toString().getBytes()); } catch (Exception e) { throw new RuntimeException(e); } }
[ "@", "SuppressWarnings", "(", "\"InsecureCryptoUsage\"", ")", "// Only used in known-weak crypto \"legacy\" mode.", "static", "byte", "[", "]", "aes128Encrypt", "(", "StringBuilder", "message", ",", "String", "key", ")", "{", "try", "{", "key", "=", "normalizeString", ...
Encrypt a string with AES-128 using the specified key. @param message Input string. @param key Encryption key. @return Encrypted output.
[ "Encrypt", "a", "string", "with", "AES", "-", "128", "using", "the", "specified", "key", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/Utilities.java#L178-L189
train
square/pollexor
src/main/java/com/squareup/pollexor/Thumbor.java
Thumbor.create
public static Thumbor create(String host, String key) { if (key == null || key.length() == 0) { throw new IllegalArgumentException("Key must not be blank."); } return new Thumbor(host, key); }
java
public static Thumbor create(String host, String key) { if (key == null || key.length() == 0) { throw new IllegalArgumentException("Key must not be blank."); } return new Thumbor(host, key); }
[ "public", "static", "Thumbor", "create", "(", "String", "host", ",", "String", "key", ")", "{", "if", "(", "key", "==", "null", "||", "key", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Key must not be...
Create a new instance for the specified host and encryption key. @see #create(String)
[ "Create", "a", "new", "instance", "for", "the", "specified", "host", "and", "encryption", "key", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/Thumbor.java#L23-L28
train
square/pollexor
src/main/java/com/squareup/pollexor/Thumbor.java
Thumbor.buildImage
public ThumborUrlBuilder buildImage(String image) { if (image == null || image.length() == 0) { throw new IllegalArgumentException("Image must not be blank."); } return new ThumborUrlBuilder(host, key, image); }
java
public ThumborUrlBuilder buildImage(String image) { if (image == null || image.length() == 0) { throw new IllegalArgumentException("Image must not be blank."); } return new ThumborUrlBuilder(host, key, image); }
[ "public", "ThumborUrlBuilder", "buildImage", "(", "String", "image", ")", "{", "if", "(", "image", "==", "null", "||", "image", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Image must not be blank.\"", ")", ...
Begin building a url for this host with the specified image.
[ "Begin", "building", "a", "url", "for", "this", "host", "with", "the", "specified", "image", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/Thumbor.java#L53-L58
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.resize
public ThumborUrlBuilder resize(int width, int height) { if (width < 0 && width != ORIGINAL_SIZE) { throw new IllegalArgumentException("Width must be a positive number."); } if (height < 0 && height != ORIGINAL_SIZE) { throw new IllegalArgumentException("Height must be a positive number."); } if (width == 0 && height == 0) { throw new IllegalArgumentException("Both width and height must not be zero."); } hasResize = true; resizeWidth = width; resizeHeight = height; return this; }
java
public ThumborUrlBuilder resize(int width, int height) { if (width < 0 && width != ORIGINAL_SIZE) { throw new IllegalArgumentException("Width must be a positive number."); } if (height < 0 && height != ORIGINAL_SIZE) { throw new IllegalArgumentException("Height must be a positive number."); } if (width == 0 && height == 0) { throw new IllegalArgumentException("Both width and height must not be zero."); } hasResize = true; resizeWidth = width; resizeHeight = height; return this; }
[ "public", "ThumborUrlBuilder", "resize", "(", "int", "width", ",", "int", "height", ")", "{", "if", "(", "width", "<", "0", "&&", "width", "!=", "ORIGINAL_SIZE", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Width must be a positive number.\"", "...
Resize picture to desired size. @param width Desired width. @param height Desired height. @throws IllegalArgumentException if {@code width} or {@code height} is less than 0 or both are 0.
[ "Resize", "picture", "to", "desired", "size", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L136-L150
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.crop
public ThumborUrlBuilder crop(int top, int left, int bottom, int right) { if (top < 0) { throw new IllegalArgumentException("Top must be greater or equal to zero."); } if (left < 0) { throw new IllegalArgumentException("Left must be greater or equal to zero."); } if (bottom < 1 || bottom <= top) { throw new IllegalArgumentException("Bottom must be greater than zero and top."); } if (right < 1 || right <= left) { throw new IllegalArgumentException("Right must be greater than zero and left."); } hasCrop = true; cropTop = top; cropLeft = left; cropBottom = bottom; cropRight = right; return this; }
java
public ThumborUrlBuilder crop(int top, int left, int bottom, int right) { if (top < 0) { throw new IllegalArgumentException("Top must be greater or equal to zero."); } if (left < 0) { throw new IllegalArgumentException("Left must be greater or equal to zero."); } if (bottom < 1 || bottom <= top) { throw new IllegalArgumentException("Bottom must be greater than zero and top."); } if (right < 1 || right <= left) { throw new IllegalArgumentException("Right must be greater than zero and left."); } hasCrop = true; cropTop = top; cropLeft = left; cropBottom = bottom; cropRight = right; return this; }
[ "public", "ThumborUrlBuilder", "crop", "(", "int", "top", ",", "int", "left", ",", "int", "bottom", ",", "int", "right", ")", "{", "if", "(", "top", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Top must be greater or equal to zero.\"...
Crop the image between two points. @param top Top bound. @param left Left bound. @param bottom Bottom bound. @param right Right bound. @throws IllegalArgumentException if {@code top} or {@code left} are less than zero or {@code bottom} or {@code right} are less than one or less than {@code top} or {@code left}, respectively.
[ "Crop", "the", "image", "between", "two", "points", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L211-L230
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.align
public ThumborUrlBuilder align(VerticalAlign valign, HorizontalAlign halign) { return align(valign).align(halign); }
java
public ThumborUrlBuilder align(VerticalAlign valign, HorizontalAlign halign) { return align(valign).align(halign); }
[ "public", "ThumborUrlBuilder", "align", "(", "VerticalAlign", "valign", ",", "HorizontalAlign", "halign", ")", "{", "return", "align", "(", "valign", ")", ".", "align", "(", "halign", ")", ";", "}" ]
Set the horizontal and vertical alignment for the image when image gets cropped by resizing. @param valign Vertical alignment. @param halign Horizontal alignment. @throws IllegalStateException if image has not been marked for resize.
[ "Set", "the", "horizontal", "and", "vertical", "alignment", "for", "the", "image", "when", "image", "gets", "cropped", "by", "resizing", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L267-L269
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.trim
public ThumborUrlBuilder trim(TrimPixelColor value, int colorTolerance) { if (colorTolerance < 0 || colorTolerance > 442) { throw new IllegalArgumentException("Color tolerance must be between 0 and 442."); } if (colorTolerance > 0 && value == null) { throw new IllegalArgumentException("Trim pixel color value must not be null."); } isTrim = true; trimPixelColor = value; trimColorTolerance = colorTolerance; return this; }
java
public ThumborUrlBuilder trim(TrimPixelColor value, int colorTolerance) { if (colorTolerance < 0 || colorTolerance > 442) { throw new IllegalArgumentException("Color tolerance must be between 0 and 442."); } if (colorTolerance > 0 && value == null) { throw new IllegalArgumentException("Trim pixel color value must not be null."); } isTrim = true; trimPixelColor = value; trimColorTolerance = colorTolerance; return this; }
[ "public", "ThumborUrlBuilder", "trim", "(", "TrimPixelColor", "value", ",", "int", "colorTolerance", ")", "{", "if", "(", "colorTolerance", "<", "0", "||", "colorTolerance", ">", "442", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Color tolerance ...
Removing surrounding space in image. Get trim color from specified pixel. @param value orientation from where to get the pixel color. @param colorTolerance 0 - 442. This is the euclidian distance between the colors of the reference pixel and the surrounding pixels is used. If the distance is within the tolerance they'll get trimmed.
[ "Removing", "surrounding", "space", "in", "image", ".", "Get", "trim", "color", "from", "specified", "pixel", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L306-L317
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.assembleConfig
StringBuilder assembleConfig(boolean meta) { StringBuilder builder = new StringBuilder(); if (meta) { builder.append(PREFIX_META); } if (isTrim) { builder.append(PART_TRIM); if (trimPixelColor != null) { builder.append(":").append(trimPixelColor.value); if (trimColorTolerance > 0) { builder.append(":").append(trimColorTolerance); } } builder.append("/"); } if (hasCrop) { builder.append(cropLeft).append("x").append(cropTop) // .append(":").append(cropRight).append("x").append(cropBottom); builder.append("/"); } if (hasResize) { if (fitInStyle != null) { builder.append(fitInStyle.value).append("/"); } if (flipHorizontally) { builder.append("-"); } if (resizeWidth == ORIGINAL_SIZE) { builder.append("orig"); } else { builder.append(resizeWidth); } builder.append("x"); if (flipVertically) { builder.append("-"); } if (resizeHeight == ORIGINAL_SIZE) { builder.append("orig"); } else { builder.append(resizeHeight); } if (isSmart) { builder.append("/").append(PART_SMART); } else { if (cropHorizontalAlign != null) { builder.append("/").append(cropHorizontalAlign.value); } if (cropVerticalAlign != null) { builder.append("/").append(cropVerticalAlign.value); } } builder.append("/"); } if (filters != null) { builder.append(PART_FILTERS); for (String filter : filters) { builder.append(":").append(filter); } builder.append("/"); } builder.append(isLegacy ? md5(image) : image); return builder; }
java
StringBuilder assembleConfig(boolean meta) { StringBuilder builder = new StringBuilder(); if (meta) { builder.append(PREFIX_META); } if (isTrim) { builder.append(PART_TRIM); if (trimPixelColor != null) { builder.append(":").append(trimPixelColor.value); if (trimColorTolerance > 0) { builder.append(":").append(trimColorTolerance); } } builder.append("/"); } if (hasCrop) { builder.append(cropLeft).append("x").append(cropTop) // .append(":").append(cropRight).append("x").append(cropBottom); builder.append("/"); } if (hasResize) { if (fitInStyle != null) { builder.append(fitInStyle.value).append("/"); } if (flipHorizontally) { builder.append("-"); } if (resizeWidth == ORIGINAL_SIZE) { builder.append("orig"); } else { builder.append(resizeWidth); } builder.append("x"); if (flipVertically) { builder.append("-"); } if (resizeHeight == ORIGINAL_SIZE) { builder.append("orig"); } else { builder.append(resizeHeight); } if (isSmart) { builder.append("/").append(PART_SMART); } else { if (cropHorizontalAlign != null) { builder.append("/").append(cropHorizontalAlign.value); } if (cropVerticalAlign != null) { builder.append("/").append(cropVerticalAlign.value); } } builder.append("/"); } if (filters != null) { builder.append(PART_FILTERS); for (String filter : filters) { builder.append(":").append(filter); } builder.append("/"); } builder.append(isLegacy ? md5(image) : image); return builder; }
[ "StringBuilder", "assembleConfig", "(", "boolean", "meta", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", ")", ";", "if", "(", "meta", ")", "{", "builder", ".", "append", "(", "PREFIX_META", ")", ";", "}", "if", "(", "isTrim", ")...
Assemble the configuration section of the URL.
[ "Assemble", "the", "configuration", "section", "of", "the", "URL", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L427-L497
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.rgb
public static String rgb(int r, int g, int b) { if (r < -100 || r > 100) { throw new IllegalArgumentException("Red value must be between -100 and 100, inclusive."); } if (g < -100 || g > 100) { throw new IllegalArgumentException("Green value must be between -100 and 100, inclusive."); } if (b < -100 || b > 100) { throw new IllegalArgumentException("Blue value must be between -100 and 100, inclusive."); } return FILTER_RGB + "(" + r + "," + g + "," + b + ")"; }
java
public static String rgb(int r, int g, int b) { if (r < -100 || r > 100) { throw new IllegalArgumentException("Red value must be between -100 and 100, inclusive."); } if (g < -100 || g > 100) { throw new IllegalArgumentException("Green value must be between -100 and 100, inclusive."); } if (b < -100 || b > 100) { throw new IllegalArgumentException("Blue value must be between -100 and 100, inclusive."); } return FILTER_RGB + "(" + r + "," + g + "," + b + ")"; }
[ "public", "static", "String", "rgb", "(", "int", "r", ",", "int", "g", ",", "int", "b", ")", "{", "if", "(", "r", "<", "-", "100", "||", "r", ">", "100", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Red value must be between -100 and 100...
This filter changes the amount of color in each of the three channels. @param r The amount of redness in the picture. Can range from -100 to 100 in percentage. @param g The amount of greenness in the picture. Can range from -100 to 100 in percentage. @param b The amount of blueness in the picture. Can range from -100 to 100 in percentage. @throws IllegalArgumentException if {@code r}, {@code g}, or {@code b} are outside of bounds.
[ "This", "filter", "changes", "the", "amount", "of", "color", "in", "each", "of", "the", "three", "channels", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L561-L572
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.roundCorner
public static String roundCorner(int radiusInner, int radiusOuter, int color) { if (radiusInner < 1) { throw new IllegalArgumentException("Radius must be greater than zero."); } if (radiusOuter < 0) { throw new IllegalArgumentException("Outer radius must be greater than or equal to zero."); } StringBuilder builder = new StringBuilder(FILTER_ROUND_CORNER).append("(").append(radiusInner); if (radiusOuter > 0) { builder.append("|").append(radiusOuter); } final int r = (color & 0xFF0000) >>> 16; final int g = (color & 0xFF00) >>> 8; final int b = color & 0xFF; return builder.append(",") // .append(r).append(",") // .append(g).append(",") // .append(b).append(")") // .toString(); }
java
public static String roundCorner(int radiusInner, int radiusOuter, int color) { if (radiusInner < 1) { throw new IllegalArgumentException("Radius must be greater than zero."); } if (radiusOuter < 0) { throw new IllegalArgumentException("Outer radius must be greater than or equal to zero."); } StringBuilder builder = new StringBuilder(FILTER_ROUND_CORNER).append("(").append(radiusInner); if (radiusOuter > 0) { builder.append("|").append(radiusOuter); } final int r = (color & 0xFF0000) >>> 16; final int g = (color & 0xFF00) >>> 8; final int b = color & 0xFF; return builder.append(",") // .append(r).append(",") // .append(g).append(",") // .append(b).append(")") // .toString(); }
[ "public", "static", "String", "roundCorner", "(", "int", "radiusInner", ",", "int", "radiusOuter", ",", "int", "color", ")", "{", "if", "(", "radiusInner", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Radius must be greater than zero.\""...
This filter adds rounded corners to the image using the specified color as the background. @param radiusInner amount of pixels to use as radius. @param radiusOuter specifies the second value for the ellipse used for the radius. Use 0 for no value. @param color fill color for clipped region.
[ "This", "filter", "adds", "rounded", "corners", "to", "the", "image", "using", "the", "specified", "color", "as", "the", "background", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L601-L620
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.fill
public static String fill(int color) { final String colorCode = Integer.toHexString(color & 0xFFFFFF); // Strip alpha return FILTER_FILL + "(" + colorCode + ")"; }
java
public static String fill(int color) { final String colorCode = Integer.toHexString(color & 0xFFFFFF); // Strip alpha return FILTER_FILL + "(" + colorCode + ")"; }
[ "public", "static", "String", "fill", "(", "int", "color", ")", "{", "final", "String", "colorCode", "=", "Integer", ".", "toHexString", "(", "color", "&", "0xFFFFFF", ")", ";", "// Strip alpha", "return", "FILTER_FILL", "+", "\"(\"", "+", "colorCode", "+", ...
This filter permit to return an image sized exactly as requested wherever is its ratio by filling with chosen color the missing parts. Usually used with "fit-in" or "adaptive-fit-in" @param color integer representation of color.
[ "This", "filter", "permit", "to", "return", "an", "image", "sized", "exactly", "as", "requested", "wherever", "is", "its", "ratio", "by", "filling", "with", "chosen", "color", "the", "missing", "parts", ".", "Usually", "used", "with", "fit", "-", "in", "or...
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L740-L743
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.format
public static String format(ImageFormat format) { if (format == null) { throw new IllegalArgumentException("You must specify an image format."); } return FILTER_FORMAT + "(" + format.value + ")"; }
java
public static String format(ImageFormat format) { if (format == null) { throw new IllegalArgumentException("You must specify an image format."); } return FILTER_FORMAT + "(" + format.value + ")"; }
[ "public", "static", "String", "format", "(", "ImageFormat", "format", ")", "{", "if", "(", "format", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"You must specify an image format.\"", ")", ";", "}", "return", "FILTER_FORMAT", "+", ...
Specify the output format of the image. @see ImageFormat
[ "Specify", "the", "output", "format", "of", "the", "image", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L750-L755
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.frame
public static String frame(String imageUrl) { if (imageUrl == null || imageUrl.length() == 0) { throw new IllegalArgumentException("Image URL must not be blank."); } return FILTER_FRAME + "(" + imageUrl + ")"; }
java
public static String frame(String imageUrl) { if (imageUrl == null || imageUrl.length() == 0) { throw new IllegalArgumentException("Image URL must not be blank."); } return FILTER_FRAME + "(" + imageUrl + ")"; }
[ "public", "static", "String", "frame", "(", "String", "imageUrl", ")", "{", "if", "(", "imageUrl", "==", "null", "||", "imageUrl", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Image URL must not be blank.\""...
This filter uses a 9-patch to overlay the image. @param imageUrl Watermark image URL. It is very important to understand that the same image loader that Thumbor uses will be used here.
[ "This", "filter", "uses", "a", "9", "-", "patch", "to", "overlay", "the", "image", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L763-L768
train
square/pollexor
src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
ThumborUrlBuilder.blur
public static String blur(int radius, int sigma) { if (radius < 1) { throw new IllegalArgumentException("Radius must be greater than zero."); } if (radius > 150) { throw new IllegalArgumentException("Radius must be lower or equal than 150."); } if (sigma < 0) { throw new IllegalArgumentException("Sigma must be greater than zero."); } return FILTER_BLUR + "(" + radius + "," + sigma + ")"; }
java
public static String blur(int radius, int sigma) { if (radius < 1) { throw new IllegalArgumentException("Radius must be greater than zero."); } if (radius > 150) { throw new IllegalArgumentException("Radius must be lower or equal than 150."); } if (sigma < 0) { throw new IllegalArgumentException("Sigma must be greater than zero."); } return FILTER_BLUR + "(" + radius + "," + sigma + ")"; }
[ "public", "static", "String", "blur", "(", "int", "radius", ",", "int", "sigma", ")", "{", "if", "(", "radius", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Radius must be greater than zero.\"", ")", ";", "}", "if", "(", "radius", ...
This filter adds a blur effect to the image using the specified radius and sigma. @param radius Radius used in the gaussian function to generate a matrix, maximum value is 150. The bigger the radius more blurred will be the image. @param sigma Sigma used in the gaussian function.
[ "This", "filter", "adds", "a", "blur", "effect", "to", "the", "image", "using", "the", "specified", "radius", "and", "sigma", "." ]
b72430d2799f617f7fcbb2d3ceb27810c9c6d38f
https://github.com/square/pollexor/blob/b72430d2799f617f7fcbb2d3ceb27810c9c6d38f/src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java#L801-L812
train
square/seismic
library/src/main/java/com/squareup/seismic/ShakeDetector.java
ShakeDetector.start
public boolean start(SensorManager sensorManager) { // Already started? if (accelerometer != null) { return true; } accelerometer = sensorManager.getDefaultSensor( Sensor.TYPE_ACCELEROMETER); // If this phone has an accelerometer, listen to it. if (accelerometer != null) { this.sensorManager = sensorManager; sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_FASTEST); } return accelerometer != null; }
java
public boolean start(SensorManager sensorManager) { // Already started? if (accelerometer != null) { return true; } accelerometer = sensorManager.getDefaultSensor( Sensor.TYPE_ACCELEROMETER); // If this phone has an accelerometer, listen to it. if (accelerometer != null) { this.sensorManager = sensorManager; sensorManager.registerListener(this, accelerometer, SensorManager.SENSOR_DELAY_FASTEST); } return accelerometer != null; }
[ "public", "boolean", "start", "(", "SensorManager", "sensorManager", ")", "{", "// Already started?", "if", "(", "accelerometer", "!=", "null", ")", "{", "return", "true", ";", "}", "accelerometer", "=", "sensorManager", ".", "getDefaultSensor", "(", "Sensor", "...
Starts listening for shakes on devices with appropriate hardware. @return true if the device supports shake detection.
[ "Starts", "listening", "for", "shakes", "on", "devices", "with", "appropriate", "hardware", "." ]
58660ff81c60d92bd0b863375665857df4c1e5fe
https://github.com/square/seismic/blob/58660ff81c60d92bd0b863375665857df4c1e5fe/library/src/main/java/com/squareup/seismic/ShakeDetector.java#L54-L70
train
square/seismic
library/src/main/java/com/squareup/seismic/ShakeDetector.java
ShakeDetector.stop
public void stop() { if (accelerometer != null) { queue.clear(); sensorManager.unregisterListener(this, accelerometer); sensorManager = null; accelerometer = null; } }
java
public void stop() { if (accelerometer != null) { queue.clear(); sensorManager.unregisterListener(this, accelerometer); sensorManager = null; accelerometer = null; } }
[ "public", "void", "stop", "(", ")", "{", "if", "(", "accelerometer", "!=", "null", ")", "{", "queue", ".", "clear", "(", ")", ";", "sensorManager", ".", "unregisterListener", "(", "this", ",", "accelerometer", ")", ";", "sensorManager", "=", "null", ";",...
Stops listening. Safe to call when already stopped. Ignored on devices without appropriate hardware.
[ "Stops", "listening", ".", "Safe", "to", "call", "when", "already", "stopped", ".", "Ignored", "on", "devices", "without", "appropriate", "hardware", "." ]
58660ff81c60d92bd0b863375665857df4c1e5fe
https://github.com/square/seismic/blob/58660ff81c60d92bd0b863375665857df4c1e5fe/library/src/main/java/com/squareup/seismic/ShakeDetector.java#L76-L83
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.findById
public ItemRequest<Task> findById(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "GET"); }
java
public ItemRequest<Task> findById(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "ItemRequest", "<", "Task", ">", "findById", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this", ",", "Ta...
Returns the complete task record for a single task. @param task The task to get. @return Request object
[ "Returns", "the", "complete", "task", "record", "for", "a", "single", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L66-L70
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.update
public ItemRequest<Task> update(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "PUT"); }
java
public ItemRequest<Task> update(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "PUT"); }
[ "public", "ItemRequest", "<", "Task", ">", "update", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this", ",", "Task...
A specific, existing task can be updated by making a PUT request on the URL for that task. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Returns the complete updated task record. @param task The task to update. @return Request object
[ "A", "specific", "existing", "task", "can", "be", "updated", "by", "making", "a", "PUT", "request", "on", "the", "URL", "for", "that", "task", ".", "Only", "the", "fields", "provided", "in", "the", "data", "block", "will", "be", "updated", ";", "any", ...
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L86-L90
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.delete
public ItemRequest<Task> delete(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "DELETE"); }
java
public ItemRequest<Task> delete(String task) { String path = String.format("/tasks/%s", task); return new ItemRequest<Task>(this, Task.class, path, "DELETE"); }
[ "public", "ItemRequest", "<", "Task", ">", "delete", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this", ",", "Task...
A specific, existing task can be deleted by making a DELETE request on the URL for that task. Deleted tasks go into the "trash" of the user making the delete request. Tasks can be recovered from the trash within a period of 30 days; afterward they are completely removed from the system. Returns an empty data record. @param task The task to delete. @return Request object
[ "A", "specific", "existing", "task", "can", "be", "deleted", "by", "making", "a", "DELETE", "request", "on", "the", "URL", "for", "that", "task", ".", "Deleted", "tasks", "go", "into", "the", "trash", "of", "the", "user", "making", "the", "delete", "requ...
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L103-L107
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.findByProject
public CollectionRequest<Task> findByProject(String projectId) { String path = String.format("/projects/%s/tasks", projectId); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
java
public CollectionRequest<Task> findByProject(String projectId) { String path = String.format("/projects/%s/tasks", projectId); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Task", ">", "findByProject", "(", "String", "projectId", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/tasks\"", ",", "projectId", ")", ";", "return", "new", "CollectionRequest", "<", "Task", ...
Returns the compact task records for all tasks within the given project, ordered by their priority within the project. @param projectId The project in which to search for tasks. @return Request object
[ "Returns", "the", "compact", "task", "records", "for", "all", "tasks", "within", "the", "given", "project", "ordered", "by", "their", "priority", "within", "the", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L116-L120
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.findByTag
public CollectionRequest<Task> findByTag(String tag) { String path = String.format("/tags/%s/tasks", tag); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
java
public CollectionRequest<Task> findByTag(String tag) { String path = String.format("/tags/%s/tasks", tag); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Task", ">", "findByTag", "(", "String", "tag", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tags/%s/tasks\"", ",", "tag", ")", ";", "return", "new", "CollectionRequest", "<", "Task", ">", "(", "thi...
Returns the compact task records for all tasks with the given tag. @param tag The tag in which to search for tasks. @return Request object
[ "Returns", "the", "compact", "task", "records", "for", "all", "tasks", "with", "the", "given", "tag", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L128-L132
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.getTasksWithTag
public CollectionRequest<Task> getTasksWithTag(String tag) { String path = String.format("/tags/%s/tasks", tag); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
java
public CollectionRequest<Task> getTasksWithTag(String tag) { String path = String.format("/tags/%s/tasks", tag); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Task", ">", "getTasksWithTag", "(", "String", "tag", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tags/%s/tasks\"", ",", "tag", ")", ";", "return", "new", "CollectionRequest", "<", "Task", ">", "(", ...
Returns the compact task records for all tasks with the given tag. Tasks can have more than one tag at a time. @param tag The tag to fetch tasks from. @return Request object
[ "Returns", "the", "compact", "task", "records", "for", "all", "tasks", "with", "the", "given", "tag", ".", "Tasks", "can", "have", "more", "than", "one", "tag", "at", "a", "time", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L165-L169
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.dependencies
public ItemRequest<Task> dependencies(String task) { String path = String.format("/tasks/%s/dependencies", task); return new ItemRequest<Task>(this, Task.class, path, "GET"); }
java
public ItemRequest<Task> dependencies(String task) { String path = String.format("/tasks/%s/dependencies", task); return new ItemRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "ItemRequest", "<", "Task", ">", "dependencies", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/dependencies\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "th...
Returns the compact representations of all of the dependencies of a task. @param task The task to get dependencies on. @return Request object
[ "Returns", "the", "compact", "representations", "of", "all", "of", "the", "dependencies", "of", "a", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L189-L193
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.dependents
public ItemRequest<Task> dependents(String task) { String path = String.format("/tasks/%s/dependents", task); return new ItemRequest<Task>(this, Task.class, path, "GET"); }
java
public ItemRequest<Task> dependents(String task) { String path = String.format("/tasks/%s/dependents", task); return new ItemRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "ItemRequest", "<", "Task", ">", "dependents", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/dependents\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this",...
Returns the compact representations of all of the dependents of a task. @param task The task to get dependents on. @return Request object
[ "Returns", "the", "compact", "representations", "of", "all", "of", "the", "dependents", "of", "a", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L201-L205
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.removeDependencies
public ItemRequest<Task> removeDependencies(String task) { String path = String.format("/tasks/%s/removeDependencies", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> removeDependencies(String task) { String path = String.format("/tasks/%s/removeDependencies", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "removeDependencies", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/removeDependencies\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", ...
Unlinks a set of dependencies from this task. @param task The task to remove dependencies from. @return Request object
[ "Unlinks", "a", "set", "of", "dependencies", "from", "this", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L239-L243
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.removeDependents
public ItemRequest<Task> removeDependents(String task) { String path = String.format("/tasks/%s/removeDependents", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> removeDependents(String task) { String path = String.format("/tasks/%s/removeDependents", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "removeDependents", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/removeDependents\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(...
Unlinks a set of dependents from this task. @param task The task to remove dependents from. @return Request object
[ "Unlinks", "a", "set", "of", "dependents", "from", "this", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L251-L255
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.addFollowers
public ItemRequest<Task> addFollowers(String task) { String path = String.format("/tasks/%s/addFollowers", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> addFollowers(String task) { String path = String.format("/tasks/%s/addFollowers", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "addFollowers", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/addFollowers\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "th...
Adds each of the specified followers to the task, if they are not already following. Returns the complete, updated record for the affected task. @param task The task to add followers to. @return Request object
[ "Adds", "each", "of", "the", "specified", "followers", "to", "the", "task", "if", "they", "are", "not", "already", "following", ".", "Returns", "the", "complete", "updated", "record", "for", "the", "affected", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L264-L268
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.removeFollowers
public ItemRequest<Task> removeFollowers(String task) { String path = String.format("/tasks/%s/removeFollowers", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> removeFollowers(String task) { String path = String.format("/tasks/%s/removeFollowers", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "removeFollowers", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/removeFollowers\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(",...
Removes each of the specified followers from the task if they are following. Returns the complete, updated record for the affected task. @param task The task to remove followers from. @return Request object
[ "Removes", "each", "of", "the", "specified", "followers", "from", "the", "task", "if", "they", "are", "following", ".", "Returns", "the", "complete", "updated", "record", "for", "the", "affected", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L277-L281
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.projects
public CollectionRequest<Task> projects(String task) { String path = String.format("/tasks/%s/projects", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
java
public CollectionRequest<Task> projects(String task) { String path = String.format("/tasks/%s/projects", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Task", ">", "projects", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/projects\"", ",", "task", ")", ";", "return", "new", "CollectionRequest", "<", "Task", ">", "(", ...
Returns a compact representation of all of the projects the task is in. @param task The task to get projects on. @return Request object
[ "Returns", "a", "compact", "representation", "of", "all", "of", "the", "projects", "the", "task", "is", "in", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L289-L293
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.addProject
public ItemRequest<Task> addProject(String task) { String path = String.format("/tasks/%s/addProject", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> addProject(String task) { String path = String.format("/tasks/%s/addProject", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "addProject", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/addProject\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this",...
Adds the task to the specified project, in the optional location specified. If no location arguments are given, the task will be added to the end of the project. `addProject` can also be used to reorder a task within a project or section that already contains it. At most one of `insert_before`, `insert_after`, or `section` should be specified. Inserting into a section in an non-order-dependent way can be done by specifying `section`, otherwise, to insert within a section in a particular place, specify `insert_before` or `insert_after` and a task within the section to anchor the position of this task. Returns an empty data block. @param task The task to add to a project. @return Request object
[ "Adds", "the", "task", "to", "the", "specified", "project", "in", "the", "optional", "location", "specified", ".", "If", "no", "location", "arguments", "are", "given", "the", "task", "will", "be", "added", "to", "the", "end", "of", "the", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L314-L318
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.removeProject
public ItemRequest<Task> removeProject(String task) { String path = String.format("/tasks/%s/removeProject", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> removeProject(String task) { String path = String.format("/tasks/%s/removeProject", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "removeProject", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/removeProject\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "...
Removes the task from the specified project. The task will still exist in the system, but it will not be in the project anymore. Returns an empty data block. @param task The task to remove from a project. @return Request object
[ "Removes", "the", "task", "from", "the", "specified", "project", ".", "The", "task", "will", "still", "exist", "in", "the", "system", "but", "it", "will", "not", "be", "in", "the", "project", "anymore", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L329-L333
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.tags
public CollectionRequest<Task> tags(String task) { String path = String.format("/tasks/%s/tags", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
java
public CollectionRequest<Task> tags(String task) { String path = String.format("/tasks/%s/tags", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Task", ">", "tags", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/tags\"", ",", "task", ")", ";", "return", "new", "CollectionRequest", "<", "Task", ">", "(", "this",...
Returns a compact representation of all of the tags the task has. @param task The task to get tags on. @return Request object
[ "Returns", "a", "compact", "representation", "of", "all", "of", "the", "tags", "the", "task", "has", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L341-L345
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.addTag
public ItemRequest<Task> addTag(String task) { String path = String.format("/tasks/%s/addTag", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> addTag(String task) { String path = String.format("/tasks/%s/addTag", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "addTag", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/addTag\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this", ",", ...
Adds a tag to a task. Returns an empty data block. @param task The task to add a tag to. @return Request object
[ "Adds", "a", "tag", "to", "a", "task", ".", "Returns", "an", "empty", "data", "block", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L353-L357
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.removeTag
public ItemRequest<Task> removeTag(String task) { String path = String.format("/tasks/%s/removeTag", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> removeTag(String task) { String path = String.format("/tasks/%s/removeTag", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "removeTag", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/removeTag\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this", ...
Removes a tag from the task. Returns an empty data block. @param task The task to remove a tag from. @return Request object
[ "Removes", "a", "tag", "from", "the", "task", ".", "Returns", "an", "empty", "data", "block", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L365-L369
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.subtasks
public CollectionRequest<Task> subtasks(String task) { String path = String.format("/tasks/%s/subtasks", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
java
public CollectionRequest<Task> subtasks(String task) { String path = String.format("/tasks/%s/subtasks", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Task", ">", "subtasks", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/subtasks\"", ",", "task", ")", ";", "return", "new", "CollectionRequest", "<", "Task", ">", "(", ...
Returns a compact representation of all of the subtasks of a task. @param task The task to get the subtasks of. @return Request object
[ "Returns", "a", "compact", "representation", "of", "all", "of", "the", "subtasks", "of", "a", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L377-L381
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.addSubtask
public ItemRequest<Task> addSubtask(String task) { String path = String.format("/tasks/%s/subtasks", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
java
public ItemRequest<Task> addSubtask(String task) { String path = String.format("/tasks/%s/subtasks", task); return new ItemRequest<Task>(this, Task.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Task", ">", "addSubtask", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/subtasks\"", ",", "task", ")", ";", "return", "new", "ItemRequest", "<", "Task", ">", "(", "this", ...
Creates a new subtask and adds it to the parent task. Returns the full record for the newly created subtask. @param task The task to add a subtask to. @return Request object
[ "Creates", "a", "new", "subtask", "and", "adds", "it", "to", "the", "parent", "task", ".", "Returns", "the", "full", "record", "for", "the", "newly", "created", "subtask", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L390-L394
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TasksBase.java
TasksBase.stories
public CollectionRequest<Task> stories(String task) { String path = String.format("/tasks/%s/stories", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
java
public CollectionRequest<Task> stories(String task) { String path = String.format("/tasks/%s/stories", task); return new CollectionRequest<Task>(this, Task.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Task", ">", "stories", "(", "String", "task", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tasks/%s/stories\"", ",", "task", ")", ";", "return", "new", "CollectionRequest", "<", "Task", ">", "(", "...
Returns a compact representation of all of the stories on the task. @param task The task containing the stories to get. @return Request object
[ "Returns", "a", "compact", "representation", "of", "all", "of", "the", "stories", "on", "the", "task", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TasksBase.java#L402-L406
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TagsBase.java
TagsBase.createInWorkspace
public ItemRequest<Tag> createInWorkspace(String workspace) { String path = String.format("/workspaces/%s/tags", workspace); return new ItemRequest<Tag>(this, Tag.class, path, "POST"); }
java
public ItemRequest<Tag> createInWorkspace(String workspace) { String path = String.format("/workspaces/%s/tags", workspace); return new ItemRequest<Tag>(this, Tag.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Tag", ">", "createInWorkspace", "(", "String", "workspace", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/workspaces/%s/tags\"", ",", "workspace", ")", ";", "return", "new", "ItemRequest", "<", "Tag", ">", ...
Creates a new tag in a workspace or organization. Every tag is required to be created in a specific workspace or organization, and this cannot be changed once set. Note that you can use the `workspace` parameter regardless of whether or not it is an organization. Returns the full record of the newly created tag. @param workspace The workspace or organization to create the tag in. @return Request object
[ "Creates", "a", "new", "tag", "in", "a", "workspace", "or", "organization", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TagsBase.java#L56-L60
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TagsBase.java
TagsBase.findById
public ItemRequest<Tag> findById(String tag) { String path = String.format("/tags/%s", tag); return new ItemRequest<Tag>(this, Tag.class, path, "GET"); }
java
public ItemRequest<Tag> findById(String tag) { String path = String.format("/tags/%s", tag); return new ItemRequest<Tag>(this, Tag.class, path, "GET"); }
[ "public", "ItemRequest", "<", "Tag", ">", "findById", "(", "String", "tag", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tags/%s\"", ",", "tag", ")", ";", "return", "new", "ItemRequest", "<", "Tag", ">", "(", "this", ",", "Tag", ...
Returns the complete tag record for a single tag. @param tag The tag to get. @return Request object
[ "Returns", "the", "complete", "tag", "record", "for", "a", "single", "tag", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TagsBase.java#L68-L72
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TagsBase.java
TagsBase.update
public ItemRequest<Tag> update(String tag) { String path = String.format("/tags/%s", tag); return new ItemRequest<Tag>(this, Tag.class, path, "PUT"); }
java
public ItemRequest<Tag> update(String tag) { String path = String.format("/tags/%s", tag); return new ItemRequest<Tag>(this, Tag.class, path, "PUT"); }
[ "public", "ItemRequest", "<", "Tag", ">", "update", "(", "String", "tag", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tags/%s\"", ",", "tag", ")", ";", "return", "new", "ItemRequest", "<", "Tag", ">", "(", "this", ",", "Tag", "...
Updates the properties of a tag. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Returns the complete updated tag record. @param tag The tag to update. @return Request object
[ "Updates", "the", "properties", "of", "a", "tag", ".", "Only", "the", "fields", "provided", "in", "the", "data", "block", "will", "be", "updated", ";", "any", "unspecified", "fields", "will", "remain", "unchanged", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TagsBase.java#L87-L91
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TagsBase.java
TagsBase.delete
public ItemRequest<Tag> delete(String tag) { String path = String.format("/tags/%s", tag); return new ItemRequest<Tag>(this, Tag.class, path, "DELETE"); }
java
public ItemRequest<Tag> delete(String tag) { String path = String.format("/tags/%s", tag); return new ItemRequest<Tag>(this, Tag.class, path, "DELETE"); }
[ "public", "ItemRequest", "<", "Tag", ">", "delete", "(", "String", "tag", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/tags/%s\"", ",", "tag", ")", ";", "return", "new", "ItemRequest", "<", "Tag", ">", "(", "this", ",", "Tag", "...
A specific, existing tag can be deleted by making a DELETE request on the URL for that tag. Returns an empty data record. @param tag The tag to delete. @return Request object
[ "A", "specific", "existing", "tag", "can", "be", "deleted", "by", "making", "a", "DELETE", "request", "on", "the", "URL", "for", "that", "tag", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TagsBase.java#L102-L106
train
Asana/java-asana
src/main/java/com/asana/resources/gen/TagsBase.java
TagsBase.findByWorkspace
public CollectionRequest<Tag> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/tags", workspace); return new CollectionRequest<Tag>(this, Tag.class, path, "GET"); }
java
public CollectionRequest<Tag> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/tags", workspace); return new CollectionRequest<Tag>(this, Tag.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Tag", ">", "findByWorkspace", "(", "String", "workspace", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/workspaces/%s/tags\"", ",", "workspace", ")", ";", "return", "new", "CollectionRequest", "<", "Tag",...
Returns the compact tag records for all tags in the workspace. @param workspace The workspace or organization to find tags in. @return Request object
[ "Returns", "the", "compact", "tag", "records", "for", "all", "tags", "in", "the", "workspace", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/TagsBase.java#L125-L129
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.createInWorkspace
public ItemRequest<Project> createInWorkspace(String workspace) { String path = String.format("/workspaces/%s/projects", workspace); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> createInWorkspace(String workspace) { String path = String.format("/workspaces/%s/projects", workspace); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "createInWorkspace", "(", "String", "workspace", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/workspaces/%s/projects\"", ",", "workspace", ")", ";", "return", "new", "ItemRequest", "<", "Project...
If the workspace for your project _is_ an organization, you must also supply a `team` to share the project with. Returns the full record of the newly created project. @param workspace The workspace or organization to create the project in. @return Request object
[ "If", "the", "workspace", "for", "your", "project", "_is_", "an", "organization", "you", "must", "also", "supply", "a", "team", "to", "share", "the", "project", "with", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L57-L61
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.createInTeam
public ItemRequest<Project> createInTeam(String team) { String path = String.format("/teams/%s/projects", team); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> createInTeam(String team) { String path = String.format("/teams/%s/projects", team); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "createInTeam", "(", "String", "team", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/teams/%s/projects\"", ",", "team", ")", ";", "return", "new", "ItemRequest", "<", "Project", ">", "(", "...
Creates a project shared with the given team. Returns the full record of the newly created project. @param team The team to create the project in. @return Request object
[ "Creates", "a", "project", "shared", "with", "the", "given", "team", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L71-L75
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.findById
public ItemRequest<Project> findById(String project) { String path = String.format("/projects/%s", project); return new ItemRequest<Project>(this, Project.class, path, "GET"); }
java
public ItemRequest<Project> findById(String project) { String path = String.format("/projects/%s", project); return new ItemRequest<Project>(this, Project.class, path, "GET"); }
[ "public", "ItemRequest", "<", "Project", ">", "findById", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "Project", ">", "(", "this...
Returns the complete project record for a single project. @param project The project to get. @return Request object
[ "Returns", "the", "complete", "project", "record", "for", "a", "single", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L83-L87
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.update
public ItemRequest<Project> update(String project) { String path = String.format("/projects/%s", project); return new ItemRequest<Project>(this, Project.class, path, "PUT"); }
java
public ItemRequest<Project> update(String project) { String path = String.format("/projects/%s", project); return new ItemRequest<Project>(this, Project.class, path, "PUT"); }
[ "public", "ItemRequest", "<", "Project", ">", "update", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "Project", ">", "(", "this",...
A specific, existing project can be updated by making a PUT request on the URL for that project. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the task. Returns the complete updated project record. @param project The project to update. @return Request object
[ "A", "specific", "existing", "project", "can", "be", "updated", "by", "making", "a", "PUT", "request", "on", "the", "URL", "for", "that", "project", ".", "Only", "the", "fields", "provided", "in", "the", "data", "block", "will", "be", "updated", ";", "an...
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L103-L107
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.delete
public ItemRequest<Project> delete(String project) { String path = String.format("/projects/%s", project); return new ItemRequest<Project>(this, Project.class, path, "DELETE"); }
java
public ItemRequest<Project> delete(String project) { String path = String.format("/projects/%s", project); return new ItemRequest<Project>(this, Project.class, path, "DELETE"); }
[ "public", "ItemRequest", "<", "Project", ">", "delete", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "Project", ">", "(", "this",...
A specific, existing project can be deleted by making a DELETE request on the URL for that project. Returns an empty data record. @param project The project to delete. @return Request object
[ "A", "specific", "existing", "project", "can", "be", "deleted", "by", "making", "a", "DELETE", "request", "on", "the", "URL", "for", "that", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L118-L122
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.findByWorkspace
public CollectionRequest<Project> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/projects", workspace); return new CollectionRequest<Project>(this, Project.class, path, "GET"); }
java
public CollectionRequest<Project> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/projects", workspace); return new CollectionRequest<Project>(this, Project.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Project", ">", "findByWorkspace", "(", "String", "workspace", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/workspaces/%s/projects\"", ",", "workspace", ")", ";", "return", "new", "CollectionRequest", "<", ...
Returns the compact project records for all projects in the workspace. @param workspace The workspace or organization to find projects in. @return Request object
[ "Returns", "the", "compact", "project", "records", "for", "all", "projects", "in", "the", "workspace", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L141-L145
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.findByTeam
public CollectionRequest<Project> findByTeam(String team) { String path = String.format("/teams/%s/projects", team); return new CollectionRequest<Project>(this, Project.class, path, "GET"); }
java
public CollectionRequest<Project> findByTeam(String team) { String path = String.format("/teams/%s/projects", team); return new CollectionRequest<Project>(this, Project.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Project", ">", "findByTeam", "(", "String", "team", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/teams/%s/projects\"", ",", "team", ")", ";", "return", "new", "CollectionRequest", "<", "Project", ">", ...
Returns the compact project records for all projects in the team. @param team The team to find projects in. @return Request object
[ "Returns", "the", "compact", "project", "records", "for", "all", "projects", "in", "the", "team", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L153-L157
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.tasks
public CollectionRequest<Project> tasks(String project) { String path = String.format("/projects/%s/tasks", project); return new CollectionRequest<Project>(this, Project.class, path, "GET"); }
java
public CollectionRequest<Project> tasks(String project) { String path = String.format("/projects/%s/tasks", project); return new CollectionRequest<Project>(this, Project.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "Project", ">", "tasks", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/tasks\"", ",", "project", ")", ";", "return", "new", "CollectionRequest", "<", "Project", ">",...
Returns the compact task records for all tasks within the given project, ordered by their priority within the project. Tasks can exist in more than one project at a time. @param project The project in which to search for tasks. @return Request object
[ "Returns", "the", "compact", "task", "records", "for", "all", "tasks", "within", "the", "given", "project", "ordered", "by", "their", "priority", "within", "the", "project", ".", "Tasks", "can", "exist", "in", "more", "than", "one", "project", "at", "a", "...
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L166-L170
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.addFollowers
public ItemRequest<Project> addFollowers(String project) { String path = String.format("/projects/%s/addFollowers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> addFollowers(String project) { String path = String.format("/projects/%s/addFollowers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "addFollowers", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/addFollowers\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "Project", ">...
Adds the specified list of users as followers to the project. Followers are a subset of members, therefore if the users are not already members of the project they will also become members as a result of this operation. Returns the updated project record. @param project The project to add followers to. @return Request object
[ "Adds", "the", "specified", "list", "of", "users", "as", "followers", "to", "the", "project", ".", "Followers", "are", "a", "subset", "of", "members", "therefore", "if", "the", "users", "are", "not", "already", "members", "of", "the", "project", "they", "w...
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L180-L184
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.removeFollowers
public ItemRequest<Project> removeFollowers(String project) { String path = String.format("/projects/%s/removeFollowers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> removeFollowers(String project) { String path = String.format("/projects/%s/removeFollowers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "removeFollowers", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/removeFollowers\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "Project"...
Removes the specified list of users from following the project, this will not affect project membership status. Returns the updated project record. @param project The project to remove followers from. @return Request object
[ "Removes", "the", "specified", "list", "of", "users", "from", "following", "the", "project", "this", "will", "not", "affect", "project", "membership", "status", ".", "Returns", "the", "updated", "project", "record", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L193-L197
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.addMembers
public ItemRequest<Project> addMembers(String project) { String path = String.format("/projects/%s/addMembers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> addMembers(String project) { String path = String.format("/projects/%s/addMembers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "addMembers", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/addMembers\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "Project", ">", ...
Adds the specified list of users as members of the project. Returns the updated project record. @param project The project to add members to. @return Request object
[ "Adds", "the", "specified", "list", "of", "users", "as", "members", "of", "the", "project", ".", "Returns", "the", "updated", "project", "record", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L205-L209
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.removeMembers
public ItemRequest<Project> removeMembers(String project) { String path = String.format("/projects/%s/removeMembers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> removeMembers(String project) { String path = String.format("/projects/%s/removeMembers", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "removeMembers", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/removeMembers\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "Project", ...
Removes the specified list of members from the project. Returns the updated project record. @param project The project to remove members from. @return Request object
[ "Removes", "the", "specified", "list", "of", "members", "from", "the", "project", ".", "Returns", "the", "updated", "project", "record", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L217-L221
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.addCustomFieldSetting
public ItemRequest<Project> addCustomFieldSetting(String project) { String path = String.format("/projects/%s/addCustomFieldSetting", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> addCustomFieldSetting(String project) { String path = String.format("/projects/%s/addCustomFieldSetting", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "addCustomFieldSetting", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/addCustomFieldSetting\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<",...
Create a new custom field setting on the project. @param project The project to associate the custom field with @return Request object
[ "Create", "a", "new", "custom", "field", "setting", "on", "the", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L229-L233
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectsBase.java
ProjectsBase.removeCustomFieldSetting
public ItemRequest<Project> removeCustomFieldSetting(String project) { String path = String.format("/projects/%s/removeCustomFieldSetting", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
java
public ItemRequest<Project> removeCustomFieldSetting(String project) { String path = String.format("/projects/%s/removeCustomFieldSetting", project); return new ItemRequest<Project>(this, Project.class, path, "POST"); }
[ "public", "ItemRequest", "<", "Project", ">", "removeCustomFieldSetting", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/removeCustomFieldSetting\"", ",", "project", ")", ";", "return", "new", "ItemRequest", ...
Remove a custom field setting on the project. @param project The project to associate the custom field with @return Request object
[ "Remove", "a", "custom", "field", "setting", "on", "the", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectsBase.java#L241-L245
train
Asana/java-asana
src/main/java/com/asana/iterator/PageIterator.java
PageIterator.retrieveNextPage
private void retrieveNextPage() { if (this.pageSize < Long.MAX_VALUE || this.itemLimit < Long.MAX_VALUE) { this.request.query("limit", Math.min(this.pageSize, this.itemLimit - this.count)); } else { this.request.query("limit", null); } ResultBodyCollection<T> page = null; try { page = this.getNext(); } catch (IOException exception) { // See comments in hasNext(). this.ioException = exception; } if (page != null) { this.continuation = this.getContinuation(page); if (page.data != null && !page.data.isEmpty()) { this.count += page.data.size(); this.nextData = page.data; } else { this.nextData = null; } } else { this.continuation = null; this.nextData = null; } }
java
private void retrieveNextPage() { if (this.pageSize < Long.MAX_VALUE || this.itemLimit < Long.MAX_VALUE) { this.request.query("limit", Math.min(this.pageSize, this.itemLimit - this.count)); } else { this.request.query("limit", null); } ResultBodyCollection<T> page = null; try { page = this.getNext(); } catch (IOException exception) { // See comments in hasNext(). this.ioException = exception; } if (page != null) { this.continuation = this.getContinuation(page); if (page.data != null && !page.data.isEmpty()) { this.count += page.data.size(); this.nextData = page.data; } else { this.nextData = null; } } else { this.continuation = null; this.nextData = null; } }
[ "private", "void", "retrieveNextPage", "(", ")", "{", "if", "(", "this", ".", "pageSize", "<", "Long", ".", "MAX_VALUE", "||", "this", ".", "itemLimit", "<", "Long", ".", "MAX_VALUE", ")", "{", "this", ".", "request", ".", "query", "(", "\"limit\"", ",...
Retrieve the next page and store the continuation token, the new data, and any IOException that may occur. Note that it is safe to pass null values to {@link CollectionRequest#query(String, Object)}. Method {@link com.asana.Client#request(com.asana.requests.Request)} will not include such options.
[ "Retrieve", "the", "next", "page", "and", "store", "the", "continuation", "token", "the", "new", "data", "and", "any", "IOException", "that", "may", "occur", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/iterator/PageIterator.java#L48-L73
train
Asana/java-asana
src/main/java/com/asana/resources/gen/UsersBase.java
UsersBase.findById
public ItemRequest<User> findById(String user) { String path = String.format("/users/%s", user); return new ItemRequest<User>(this, User.class, path, "GET"); }
java
public ItemRequest<User> findById(String user) { String path = String.format("/users/%s", user); return new ItemRequest<User>(this, User.class, path, "GET"); }
[ "public", "ItemRequest", "<", "User", ">", "findById", "(", "String", "user", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/users/%s\"", ",", "user", ")", ";", "return", "new", "ItemRequest", "<", "User", ">", "(", "this", ",", "Us...
Returns the full user record for the single user with the provided ID. @param user An identifier for the user. Can be one of an email address, the globally unique identifier for the user, or the keyword `me` to indicate the current user making the request. @return Request object
[ "Returns", "the", "full", "user", "record", "for", "the", "single", "user", "with", "the", "provided", "ID", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/UsersBase.java#L43-L47
train
Asana/java-asana
src/main/java/com/asana/resources/gen/UsersBase.java
UsersBase.findByWorkspace
public CollectionRequest<User> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/users", workspace); return new CollectionRequest<User>(this, User.class, path, "GET"); }
java
public CollectionRequest<User> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/users", workspace); return new CollectionRequest<User>(this, User.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "User", ">", "findByWorkspace", "(", "String", "workspace", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/workspaces/%s/users\"", ",", "workspace", ")", ";", "return", "new", "CollectionRequest", "<", "Use...
Returns the user records for all users in the specified workspace or organization. @param workspace The workspace in which to get users. @return Request object
[ "Returns", "the", "user", "records", "for", "all", "users", "in", "the", "specified", "workspace", "or", "organization", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/UsersBase.java#L56-L60
train
Asana/java-asana
src/main/java/com/asana/resources/gen/CustomFieldsBase.java
CustomFieldsBase.findById
public ItemRequest<CustomField> findById(String customField) { String path = String.format("/custom_fields/%s", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "GET"); }
java
public ItemRequest<CustomField> findById(String customField) { String path = String.format("/custom_fields/%s", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "GET"); }
[ "public", "ItemRequest", "<", "CustomField", ">", "findById", "(", "String", "customField", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/custom_fields/%s\"", ",", "customField", ")", ";", "return", "new", "ItemRequest", "<", "CustomField", ...
Returns the complete definition of a custom field's metadata. @param customField Globally unique identifier for the custom field. @return Request object
[ "Returns", "the", "complete", "definition", "of", "a", "custom", "field", "s", "metadata", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/CustomFieldsBase.java#L44-L48
train
Asana/java-asana
src/main/java/com/asana/resources/gen/CustomFieldsBase.java
CustomFieldsBase.findByWorkspace
public CollectionRequest<CustomField> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/custom_fields", workspace); return new CollectionRequest<CustomField>(this, CustomField.class, path, "GET"); }
java
public CollectionRequest<CustomField> findByWorkspace(String workspace) { String path = String.format("/workspaces/%s/custom_fields", workspace); return new CollectionRequest<CustomField>(this, CustomField.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "CustomField", ">", "findByWorkspace", "(", "String", "workspace", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/workspaces/%s/custom_fields\"", ",", "workspace", ")", ";", "return", "new", "CollectionRequest"...
Returns a list of the compact representation of all of the custom fields in a workspace. @param workspace The workspace or organization to find custom field definitions in. @return Request object
[ "Returns", "a", "list", "of", "the", "compact", "representation", "of", "all", "of", "the", "custom", "fields", "in", "a", "workspace", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/CustomFieldsBase.java#L56-L60
train
Asana/java-asana
src/main/java/com/asana/resources/gen/CustomFieldsBase.java
CustomFieldsBase.update
public ItemRequest<CustomField> update(String customField) { String path = String.format("/custom_fields/%s", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT"); }
java
public ItemRequest<CustomField> update(String customField) { String path = String.format("/custom_fields/%s", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT"); }
[ "public", "ItemRequest", "<", "CustomField", ">", "update", "(", "String", "customField", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/custom_fields/%s\"", ",", "customField", ")", ";", "return", "new", "ItemRequest", "<", "CustomField", ...
A specific, existing custom field can be updated by making a PUT request on the URL for that custom field. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged When using this method, it is best to specify only those fields you wish to change, or else you may overwrite changes made by another user since you last retrieved the custom field. A custom field's `type` cannot be updated. An enum custom field's `enum_options` cannot be updated with this endpoint. Instead see "Work With Enum Options" for information on how to update `enum_options`. Returns the complete updated custom field record. @param customField Globally unique identifier for the custom field. @return Request object
[ "A", "specific", "existing", "custom", "field", "can", "be", "updated", "by", "making", "a", "PUT", "request", "on", "the", "URL", "for", "that", "custom", "field", ".", "Only", "the", "fields", "provided", "in", "the", "data", "block", "will", "be", "up...
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/CustomFieldsBase.java#L76-L80
train
Asana/java-asana
src/main/java/com/asana/resources/gen/CustomFieldsBase.java
CustomFieldsBase.delete
public ItemRequest<CustomField> delete(String customField) { String path = String.format("/custom_fields/%s", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "DELETE"); }
java
public ItemRequest<CustomField> delete(String customField) { String path = String.format("/custom_fields/%s", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "DELETE"); }
[ "public", "ItemRequest", "<", "CustomField", ">", "delete", "(", "String", "customField", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/custom_fields/%s\"", ",", "customField", ")", ";", "return", "new", "ItemRequest", "<", "CustomField", ...
A specific, existing custom field can be deleted by making a DELETE request on the URL for that custom field. Returns an empty data record. @param customField Globally unique identifier for the custom field. @return Request object
[ "A", "specific", "existing", "custom", "field", "can", "be", "deleted", "by", "making", "a", "DELETE", "request", "on", "the", "URL", "for", "that", "custom", "field", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/CustomFieldsBase.java#L90-L94
train
Asana/java-asana
src/main/java/com/asana/resources/gen/CustomFieldsBase.java
CustomFieldsBase.updateEnumOption
public ItemRequest<CustomField> updateEnumOption(String enumOption) { String path = String.format("/enum_options/%s", enumOption); return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT"); }
java
public ItemRequest<CustomField> updateEnumOption(String enumOption) { String path = String.format("/enum_options/%s", enumOption); return new ItemRequest<CustomField>(this, CustomField.class, path, "PUT"); }
[ "public", "ItemRequest", "<", "CustomField", ">", "updateEnumOption", "(", "String", "enumOption", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/enum_options/%s\"", ",", "enumOption", ")", ";", "return", "new", "ItemRequest", "<", "CustomFie...
Updates an existing enum option. Enum custom fields require at least one enabled enum option. Returns the full record of the updated enum option. @param enumOption Globally unique identifier for the enum option. @return Request object
[ "Updates", "an", "existing", "enum", "option", ".", "Enum", "custom", "fields", "require", "at", "least", "one", "enabled", "enum", "option", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/CustomFieldsBase.java#L118-L122
train
Asana/java-asana
src/main/java/com/asana/resources/gen/CustomFieldsBase.java
CustomFieldsBase.insertEnumOption
public ItemRequest<CustomField> insertEnumOption(String customField) { String path = String.format("/custom_fields/%s/enum_options/insert", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "POST"); }
java
public ItemRequest<CustomField> insertEnumOption(String customField) { String path = String.format("/custom_fields/%s/enum_options/insert", customField); return new ItemRequest<CustomField>(this, CustomField.class, path, "POST"); }
[ "public", "ItemRequest", "<", "CustomField", ">", "insertEnumOption", "(", "String", "customField", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/custom_fields/%s/enum_options/insert\"", ",", "customField", ")", ";", "return", "new", "ItemReques...
Moves a particular enum option to be either before or after another specified enum option in the custom field. @param customField Globally unique identifier for the custom field. @return Request object
[ "Moves", "a", "particular", "enum", "option", "to", "be", "either", "before", "or", "after", "another", "specified", "enum", "option", "in", "the", "custom", "field", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/CustomFieldsBase.java#L130-L134
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectStatusesBase.java
ProjectStatusesBase.createInProject
public ItemRequest<ProjectStatus> createInProject(String project) { String path = String.format("/projects/%s/project_statuses", project); return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "POST"); }
java
public ItemRequest<ProjectStatus> createInProject(String project) { String path = String.format("/projects/%s/project_statuses", project); return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "POST"); }
[ "public", "ItemRequest", "<", "ProjectStatus", ">", "createInProject", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/project_statuses\"", ",", "project", ")", ";", "return", "new", "ItemRequest", "<", "P...
Creates a new status update on the project. Returns the full record of the newly created project status update. @param project The project on which to create a status update. @return Request object
[ "Creates", "a", "new", "status", "update", "on", "the", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectStatusesBase.java#L33-L37
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectStatusesBase.java
ProjectStatusesBase.findByProject
public CollectionRequest<ProjectStatus> findByProject(String project) { String path = String.format("/projects/%s/project_statuses", project); return new CollectionRequest<ProjectStatus>(this, ProjectStatus.class, path, "GET"); }
java
public CollectionRequest<ProjectStatus> findByProject(String project) { String path = String.format("/projects/%s/project_statuses", project); return new CollectionRequest<ProjectStatus>(this, ProjectStatus.class, path, "GET"); }
[ "public", "CollectionRequest", "<", "ProjectStatus", ">", "findByProject", "(", "String", "project", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/projects/%s/project_statuses\"", ",", "project", ")", ";", "return", "new", "CollectionRequest", ...
Returns the compact project status update records for all updates on the project. @param project The project to find status updates for. @return Request object
[ "Returns", "the", "compact", "project", "status", "update", "records", "for", "all", "updates", "on", "the", "project", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectStatusesBase.java#L45-L49
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectStatusesBase.java
ProjectStatusesBase.findById
public ItemRequest<ProjectStatus> findById(String projectStatus) { String path = String.format("/project_statuses/%s", projectStatus); return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "GET"); }
java
public ItemRequest<ProjectStatus> findById(String projectStatus) { String path = String.format("/project_statuses/%s", projectStatus); return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "GET"); }
[ "public", "ItemRequest", "<", "ProjectStatus", ">", "findById", "(", "String", "projectStatus", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/project_statuses/%s\"", ",", "projectStatus", ")", ";", "return", "new", "ItemRequest", "<", "Proje...
Returns the complete record for a single status update. @param projectStatus The project status update to get. @return Request object
[ "Returns", "the", "complete", "record", "for", "a", "single", "status", "update", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectStatusesBase.java#L57-L61
train
Asana/java-asana
src/main/java/com/asana/resources/gen/ProjectStatusesBase.java
ProjectStatusesBase.delete
public ItemRequest<ProjectStatus> delete(String projectStatus) { String path = String.format("/project_statuses/%s", projectStatus); return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "DELETE"); }
java
public ItemRequest<ProjectStatus> delete(String projectStatus) { String path = String.format("/project_statuses/%s", projectStatus); return new ItemRequest<ProjectStatus>(this, ProjectStatus.class, path, "DELETE"); }
[ "public", "ItemRequest", "<", "ProjectStatus", ">", "delete", "(", "String", "projectStatus", ")", "{", "String", "path", "=", "String", ".", "format", "(", "\"/project_statuses/%s\"", ",", "projectStatus", ")", ";", "return", "new", "ItemRequest", "<", "Project...
Deletes a specific, existing project status update. Returns an empty data record. @param projectStatus The project status update to delete. @return Request object
[ "Deletes", "a", "specific", "existing", "project", "status", "update", "." ]
abeea92fd5a71260a5d804db4da94e52fd7a15a7
https://github.com/Asana/java-asana/blob/abeea92fd5a71260a5d804db4da94e52fd7a15a7/src/main/java/com/asana/resources/gen/ProjectStatusesBase.java#L71-L75
train