name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
zxing_HybridBinarizer_calculateThresholdForBlock_rdh | /**
* For each block in the image, calculate the average black point using a 5x5 grid
* of the blocks around it. Also handles the corner cases (fractional blocks are computed based
* on the last pixels in the row/column which are also used in the previous block).
*/
private static void calculateThresholdForBlock(by... | 3.26 |
zxing_HybridBinarizer_calculateBlackPoints_rdh | /**
* Calculates a single black point for each block of pixels and saves it away.
* See the following thread for a discussion of this algorithm:
* http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0
*/
private static int[][] calculateBlackPoints(byte[] luminances, int subWidth, int subHeigh... | 3.26 |
zxing_HybridBinarizer_thresholdBlock_rdh | /**
* Applies a single threshold to a block of pixels.
*/
private static void thresholdBlock(byte[] luminances, int xoffset, int yoffset, int threshold, int stride, BitMatrix matrix) {
for (int y = 0, v21 = (yoffset * stride) +
xoffset; y < BLOCK_SIZE; y++ , v21 += stride) {
for (int x = 0; x < BLOCK_SIZE; x+... | 3.26 |
zxing_UPCEANReader_m0_rdh | /**
* Computes the UPC/EAN checksum on a string of digits, and reports
* whether the checksum is correct or not.
*
* @param s
* string of digits to check
* @return true iff string of digits passes the UPC/EAN checksum algorithm
* @throws FormatException
* if the string does not contain only digits
*/
stati... | 3.26 |
zxing_UPCEANReader_findGuardPattern_rdh | /**
*
* @param row
* row of black/white values to search
* @param rowOffset
* position to start search
* @param whiteFirst
* if true, indicates that the pattern specifies white/black/white/...
* p... | 3.26 |
zxing_UPCEANReader_checkChecksum_rdh | /**
*
* @param s
* string of digits to check
* @return {@link #checkStandardUPCEANChecksum(CharSequence)}
* @throws FormatException
* if the string does not contain only digits
*/
boolean checkChecksum(String s) throws FormatException
{
return m0(s);
} | 3.26 |
zxing_UPCEANReader_decodeRow_rdh | /**
* <p>Like {@link #decodeRow(int, BitArray, Map)}, but
* allows caller to inform method about where the UPC/EAN start pattern is
* found. This allows this to be computed once and reused across many implementations.</p>
*
* @param rowNumber
* row index into the image
* @param row
* encoding of the row of ... | 3.26 |
zxing_TelResultHandler_getDisplayContents_rdh | // Overriden so we can take advantage of Android's phone number hyphenation routines.
@Override
public CharSequence getDisplayContents()
{
String contents = getResult().getDisplayResult();
contents = contents.replace("\r", "");
return formatPhone(contents);
} | 3.26 |
zxing_FinderPatternFinder_crossCheckHorizontal_rdh | /**
* <p>Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical,
* except it reads horizontally instead of vertically. This is used to cross-cross
* check a vertical cross check and locate the real center of the alignment pattern.</p>
*/
private float crossCheckHorizontal(int start... | 3.26 |
zxing_FinderPatternFinder_centerFromEnd_rdh | /**
* Given a count of black/white/black/white/black pixels just seen and an end position,
* figures the location of the center of this run.
*/
private static float centerFromEnd(int[] stateCount, int end) {
return ((end - stateCount[4]) - stateCount[3]) - (stateCount[2] / 2.0F);
} | 3.26 |
zxing_FinderPatternFinder_squaredDistance_rdh | /**
* Get square of distance between a and b.
*/
private static double squaredDistance(FinderPattern a, FinderPattern b) {
double v55 = a.getX() - b.getX();
double y = a.getY() - b.getY();
return (v55 * v55) + (y * y);
}
/**
*
* @return the 3 best {@link FinderPattern} | 3.26 |
zxing_FinderPatternFinder_crossCheckDiagonal_rdh | /**
* After a vertical and horizontal scan finds a potential finder pattern, this method
* "cross-cross-cross-checks" by scanning down diagonally through the center of the possible
* finder pattern to see if the same proportion is detected.
*
* @param centerI
* row where a finder pattern was detected
* @param ... | 3.26 |
zxing_FinderPatternFinder_handlePossibleCenter_rdh | /**
* <p>This is called when a horizontal scan finds a possible alignment pattern. It will
* cross check with a vertical scan, and if successful, will, ah, cross-cross-check
* with another horizontal scan. This is needed primarily to locate the real horizontal
* center of the pattern in cases of extreme skew.
* An... | 3.26 |
zxing_FinderPatternFinder_crossCheckVertical_rdh | /**
* <p>After a horizontal scan finds a potential finder pattern, this method
* "cross-checks" by scanning down vertically through the center of the possible
* finder pattern to see if the same proportion is detected.</p>
*
* @param startI
* row where a finder pattern was detected
... | 3.26 |
zxing_PDF417ResultMetadata_getSegmentIndex_rdh | /**
* The Segment ID represents the segment of the whole file distributed over different symbols.
*
* @return File segment index
*/
public int getSegmentIndex()
{
return segmentIndex;
} | 3.26 |
zxing_PDF417ResultMetadata_getFileName_rdh | /**
* Filename of the encoded file
*
* @return filename
*/
public String getFileName() {
return fileName;
} | 3.26 |
zxing_PDF417ResultMetadata_isLastSegment_rdh | /**
*
* @return true if it is the last segment
*/
public boolean isLastSegment() {
return lastSegment;
} | 3.26 |
zxing_PDF417ResultMetadata_getSegmentCount_rdh | /**
*
* @return count of segments, -1 if not set
*/
public int getSegmentCount() {
return segmentCount;
} | 3.26 |
zxing_PDF417ResultMetadata_getFileId_rdh | /**
* Is the same for each related PDF417 symbol
*
* @return File ID
*/
public String getFileId() {
return fileId;
} | 3.26 |
zxing_PDF417ResultMetadata_getChecksum_rdh | /**
* 16-bit CRC checksum using CCITT-16
*
* @return crc checksum, -1 if not set
*/
public int getChecksum() {
return checksum;
} | 3.26 |
zxing_PDF417ResultMetadata_setOptionalData_rdh | /**
*
* @param optionalData
* old optional data format as int array
* @deprecated parse and use new fields
*/
@Deprecated
public void setOptionalData(int[] optionalData) {
this.optionalData = optionalData;
} | 3.26 |
zxing_PDF417ResultMetadata_getFileSize_rdh | /**
* filesize in bytes of the encoded file
*
* @return filesize in bytes, -1 if not set
*/
public long getFileSize() {return fileSize;
} | 3.26 |
zxing_PDF417ResultMetadata_getTimestamp_rdh | /**
* unix epock timestamp, elapsed seconds since 1970-01-01
*
* @return elapsed seconds, -1 if not set
*/
public long getTimestamp() {
return timestamp;
} | 3.26 |
zxing_PDF417ResultMetadata_getOptionalData_rdh | /**
*
* @return always null
* @deprecated use dedicated already parsed fields
*/
@Deprecatedpublic int[] getOptionalData() {
return optionalData;
} | 3.26 |
zxing_MonochromeRectangleDetector_findCornerFromCenter_rdh | /**
* Attempts to locate a corner of the barcode by scanning up, down, left or right from a center
* point which should be within the barcode.
*
* @param centerX
* center's x component (horizontal)
* @param deltaX
* same as deltaY but change in x per step instead
* @param left
* minimum value of x
* @pa... | 3.26 |
zxing_MatrixToImageWriter_writeToFile_rdh | /**
*
* @param matrix
* {@link BitMatrix} to write
* @param format
* image format
* @param file
* file {@link File} to write image to
* @param config
* output configuration
* @throws IOException
* if writes to the file fail
* @deprecated use {@link #writeToPath(BitMatrix, String, Path, MatrixToIma... | 3.26 |
zxing_MatrixToImageWriter_writeToPath_rdh | /**
* As {@link #writeToPath(BitMatrix, String, Path)}, but allows customization of the output.
*
* @param matrix
* {@link BitMatrix} to write
* @param format
* image format
* @param file
* file {@link Path} to write image to
* @param config
* output configuration
* @throws IOException
* if writes... | 3.26 |
zxing_MatrixToImageWriter_writeToStream_rdh | /**
* As {@link #writeToStream(BitMatrix, String, OutputStream)}, but allows customization of the output.
*
* @param matrix
* {@link BitMatrix} to write
* @param format
* image format
* @param stream
* {@link OutputStream} to write image to
* @param config
* output configuration
* @throws IOException... | 3.26 |
zxing_MatrixToImageWriter_toBufferedImage_rdh | /**
* As {@link #toBufferedImage(BitMatrix)}, but allows customization of the output.
*
* @param matrix
* {@link BitMatrix} to write
* @param config
* output configuration
* @return {@link BufferedImage} representation of the input
*/
public static BufferedImage toBufferedImage(BitMatrix matrix, MatrixToIma... | 3.26 |
zxing_HighLevelEncoder_m0_rdh | // Return a set of states that represent the possible ways of updating this
// state for the next character. The resulting set of states are added to
// the "result" list.
private void m0(State state, int index, Collection<State> result) {
char ch = ((char) (text[index] & 0xff));
boolean charInCurrentTable = ... | 3.26 |
zxing_HighLevelEncoder_encode_rdh | /**
*
* @return text represented by this encoder encoded as a {@link BitArray}
*/
public BitArray encode() {
State initialState = State.INITIAL_STATE;
if (charset != null) {
CharacterSetECI eci = CharacterSetECI.getCharacterSetECI(charset);
if (null == eci) {
throw new IllegalArgumentException("No EC... | 3.26 |
zxing_HighLevelEncoder_updateStateListForChar_rdh | // We update a set of states for a new character by updating each state
// for the new character, merging the results, and then removing the
// non-optimal states.
private Collection<State> updateStateListForChar(Iterable<State> states, int index) {
Collection<State> result = new LinkedList<>();
for (State stat... | 3.26 |
zxing_PDF417ErrorCorrection_generateErrorCorrection_rdh | /**
* Generates the error correction codewords according to 4.10 in ISO/IEC 15438:2001(E).
*
* @param dataCodewords
* the data codewords
* @param errorCorrectionLevel
* the error correction level (0-8)
* @return the String representing the error... | 3.26 |
zxing_PDF417ErrorCorrection_getRecommendedMinimumErrorCorrectionLevel_rdh | /**
* Returns the recommended minimum error correction level as described in annex E of
* ISO/IEC 15438:2001(E).
*
* @param n
* the number of data codewords
* @return the recommended minimum error correction level
*/
static int getRecommendedMinimumErrorCorrectionLevel(int n) throws WriterException {
if (n... | 3.26 |
zxing_PDF417ErrorCorrection_getErrorCorrectionCodewordCount_rdh | /**
* Determines the number of error correction codewords for a specified error correction
* level.
*
* @param errorCorrectionLevel
* the error correction level (0-8)
* @return the number of codewords generated for error correction
*/
static int getErrorCorrectionCodewordCount(int errorCorrectionLevel) {
i... | 3.26 |
zxing_ProductResultParser_parse_rdh | // Treat all UPC and EAN variants as UPCs, in the sense that they are all product barcodes.
@Override
public ProductParsedResult parse(Result result) {
BarcodeFormat format = result.getBarcodeFormat();
if (!((((format == BarcodeFormat.UPC_A) || (format == BarcodeFormat.UPC_E))
|| (fo... | 3.26 |
zxing_OneDReader_recordPattern_rdh | /**
* Records the size of successive runs of white and black pixels in a row, starting at a given point.
* The values are recorded in the given array, and the number of runs recorded is equal to the size
* of the array. If the row starts on a white pixel at the given start point, then the first count
* recorded is ... | 3.26 |
zxing_OneDReader_doDecode_rdh | /**
* We're going to examine rows from the middle outward, searching alternately above and below the
* middle, and farther out each time. rowStep is the number of rows between each successive
* attempt above and below the middle. So we'd scan row middle, then middle - rowStep, then
* middle + rowStep, then middle -... | 3.26 |
zxing_OneDReader_patternMatchVariance_rdh | /**
* Determines how closely a set of observed counts of runs of black/white values matches a given
* target pattern. This is reported as the ratio of the total variance from the expected pattern
* proportions across all pattern elements, to the length of the pattern.
*
* @param counters
* observed counters
* ... | 3.26 |
zxing_OneDReader_decode_rdh | // Note that we don't try rotation without the try harder flag, even if rotation was supported.
@Override
public Result decode(BinaryBitmap image, Map<DecodeHintType, ?> hints) throws NotFoundException, FormatException {
try {
return doDecode(image, hints);
} catch (NotFoundException nfe) {
bo... | 3.26 |
zxing_MinimalEncoder_getEndMode_rdh | /**
* Returns Mode.ASCII in case that:
* - Mode is EDIFACT and characterLength is less than 4 or the remaining characters can be encoded in at most 2
* ASCII bytes.
* - Mode is C40, TEXT or X12 and the remaining characters can be encoded in at most 1 ASCII byte.
* Returns mode in all other cases.
*/
Mode ge... | 3.26 |
zxing_MinimalEncoder_getMinSymbolSize_rdh | /**
* Returns the capacity in codewords of the smallest symbol that has enough capacity to fit the given minimal
* number of codewords.
*/
int getMinSymbolSize(int minimum) {
switch (input.getShapeHint()) {
case FORCE_SQUARE :
for (int capacity : squareCodewordCapacities) {
... | 3.26 |
zxing_MinimalEncoder_getDataBytes_rdh | // Important: The function does not return the length bytes (one or two) in case of B256 encoding
byte[] getDataBytes()
{
switch (mode) {
case ASCII :
if (input.isECI(fromPosition)) {
return getBytes(241, input.getECIValue(fromPosition) + 1);
} else if (isExtendedASCII(input.charAt(... | 3.26 |
zxing_MinimalEncoder_m0_rdh | /**
* Peeks ahead and returns 1 if the postfix consists of exactly two digits, 2 if the postfix consists of exactly
* two consecutive digits and a non extended character or of 4 digits.
* Returns 0 in any other case
*/ int m0() {
int length = input.length();
int from
= fromPosition + characterLength;... | 3.26 |
zxing_MinimalEncoder_encodeHighLevel_rdh | /**
* Performs message encoding of a DataMatrix message
*
* @param msg
* the message
* @param priorityCharset
* The preferred {@link Charset}. When the value of the argument is null, the algorithm
* chooses charsets that leads to a minimal representation. Otherwise the algorithm will use the priority
* ... | 3.26 |
zxing_MinimalEncoder_encode_rdh | /**
* Encodes input minimally and returns an array of the codewords
*
* @param input
* The string to encode
* @param priorityCharset
* The preferred {@link Charset}. When the value of the argument is null, the algorithm
* chooses charsets that leads to a minimal representation. Otherwise the algorithm will... | 3.26 |
zxing_MinimalEncoder_getCodewordsRemaining_rdh | /**
* Returns the remaining capacity in codewords of the smallest symbol that has enough capacity to fit the given
* minimal number of codewords.
*/ int getCodewordsRemaining(int minimum) {
return getMinSymbolSize(minimum) - minimum;
} | 3.26 |
zxing_MinimalEncoder_getB256Size_rdh | // does not count beyond 250
int getB256Size() {
int v26 = 0;
Edge current =
this;
while (((current != null) && (current.mode == Mode.f0)) && (v26 <= 250)) {
v26++;
current = current.previous;
}
return v26;
} | 3.26 |
zxing_DefaultPlacement_utah_rdh | /**
* Places the 8 bits of a utah-shaped symbol character in ECC200.
*
* @param row
* the row
* @param col
* the column
* @param pos
* character position
*/
private void utah(int row, int col, int pos) {module(row -
2, col - 2, pos, 1);
module(row - 2, col - 1, pos, 2);
module(row - 1, col ... | 3.26 |
zxing_IntentIntegrator_startActivityForResult_rdh | /**
* Start an activity. This method is defined to allow different methods of activity starting for
* newer versions of Android and for compatibility library.
*
* @param intent
* Intent to start.
* @param code
* Request code for the activity
* @see Activity#startActivityForResult(Intent, int)
* @see Fragme... | 3.26 |
nifi-maven_NarDependencyUtils_excludesDependencies_rdh | /**
* Creates a new ArtifactHandler for the specified Artifact that overrides the includeDependencies flag. When set, this flag prevents transitive
* dependencies from being printed in dependencies plugin.
*
* @param artifact
* The artifact
* @return The handler for the artifact
*/
private static ArtifactHandl... | 3.26 |
nifi-maven_NarProvidedDependenciesMojo_isTest_rdh | /**
* Returns whether the specified dependency has test scope.
*
* @param node
* The dependency
* @return What the dependency is a test scoped dep
*/
private boolean isTest(final DependencyNode node) {
return "test".equals(node.getArtifact().getScope());
} | 3.26 |
nifi-maven_NarProvidedDependenciesMojo_getProject_rdh | /**
* Gets the Maven project used by this mojo.
*
* @return the Maven project
*/
public MavenProject getProject() {
return project;
} | 3.26 |
nifi-maven_ExtensionClassLoaderFactory_createClassLoader_rdh | /* package visible for testing reasons */ExtensionClassLoader createClassLoader(final Set<Artifact> artifacts, final ExtensionClassLoader parent, final Artifact narArtifact) throws MojoExecutionException {
final Set<URL>
urls = new HashSet<>();
for (final Artifact artifact : artifacts) {
final Set<URL> artifa... | 3.26 |
Activiti_TextAnnotationJsonConverter_fillTypes_rdh | /**
*/
| 3.26 |
Activiti_PropertyEntityImpl_m0_rdh | // common methods //////////////////////////////////////////////////////////
@Override
public String m0() {
return ((("PropertyEntity[name=" + f0) + ", value=") + value) + "]";
} | 3.26 |
Activiti_ResourceNameUtil_getProcessDiagramResourceNameFromDeployment_rdh | /**
* Finds the name of a resource for the diagram for a process definition. Assumes that the
* process definition's key and (BPMN) resource name are already set.
*
* <p>It will first look for an image resource which matches the process specifically, before
* resorting to an image resource which matches the BPMN ... | 3.26 |
Activiti_AstRightValue_getType_rdh | /**
* according to the spec, the result is undefined for rvalues, so answer <code>null</code>
*/
public final Class<?> getType(Bindings bindings, ELContext context) {
return null;
} | 3.26 |
Activiti_AstRightValue_isReadOnly_rdh | /**
* non-lvalues are always readonly, so answer <code>true</code>
*/
public final boolean isReadOnly(Bindings bindings, ELContext context) {
return true;
} | 3.26 |
Activiti_AstRightValue_m0_rdh | /**
* non-lvalues are always readonly, so throw an exception
*/
public final void m0(Bindings bindings, ELContext context, Object value) {
throw new ELException(LocalMessages.get("error.value.set.rvalue",
getStructuralId(bindings)));
} | 3.26 |
Activiti_AstRightValue_isLiteralText_rdh | /**
* Answer <code>false</code>
*/public final boolean isLiteralText() {
return false;
} | 3.26 |
Activiti_TreeBuilderException_getEncountered_rdh | /**
*
* @return the substring (or description) that has been encountered
*/
public String getEncountered() {
return encountered;
} | 3.26 |
Activiti_TreeBuilderException_getExpected_rdh | /**
*
* @return the substring (or description) that was expected
*/
public String getExpected() {
return expected;
} | 3.26 |
Activiti_TreeBuilderException_getPosition_rdh | /**
*
* @return the error position
*/
public int getPosition() {
return f0;
} | 3.26 |
Activiti_TreeBuilderException_getExpression_rdh | /**
*
* @return the expression string
*/
public String getExpression() {
return expression;
} | 3.26 |
Activiti_WSService_getName_rdh | /**
* {@inheritDoc }
*/
public String getName() {
return this.name;
} | 3.26 |
Activiti_CommandContextFactory_getProcessEngineConfiguration_rdh | // getters and setters
// //////////////////////////////////////////////////////
public ProcessEngineConfigurationImpl getProcessEngineConfiguration() {
return processEngineConfiguration;} | 3.26 |
Activiti_DateToString_primTransform_rdh | /**
* {@inheritDoc }
*/
@Override
protected Object primTransform(Object anObject) throws
Exception {
return format.format(((Date)
(anObject)));
} | 3.26 |
Activiti_Tree_getRoot_rdh | /**
*
* @return root node
*/
public ExpressionNode getRoot() {
return root;
} | 3.26 |
Activiti_Tree_bind_rdh | /**
* Create a bindings.
*
* @param fnMapper
* the function mapper to use
* @param varMapper
* the variable mapper to use
* @param converter
* custom type converter
* @return tree bindings
*/
public Bindings bind(FunctionMapper fnMapper, VariableMapper var... | 3.26 |
Activiti_DelegateExpressionCustomPropertiesResolver_getExpressionText_rdh | /**
* returns the expression text for this execution listener. Comes in handy if you want to check which listeners you already have.
*/
public String getExpressionText() {
return expression.getExpressionText();
} | 3.26 |
Activiti_NeedsActiveTaskCmd_getSuspendedTaskException_rdh | /**
* Subclasses can override this method to provide a customized exception message that will be thrown when the task is suspended.
*/
protected String getSuspendedTaskException() {
return "Cannot execute operation: task is suspended";
} | 3.26 |
Activiti_DelegateExpressionTransactionDependentTaskListener_getExpressionText_rdh | /**
* returns the expression text for this task listener. Comes in handy if you want to check which listeners you already have.
*/
public String getExpressionText() {
return expression.getExpressionText();
} | 3.26 |
Activiti_ThrowEventJsonConverter_fillTypes_rdh | /**
*/public class ThrowEventJsonConverter extends BaseBpmnJsonConverter {
public static void fillTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap, Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap) {
fillJsonTypes(convertersToBpmn... | 3.26 |
Activiti_SpringAsyncExecutor_setTaskExecutor_rdh | /**
* Required spring injected {@link TaskExecutor} implementation that will be used to execute runnable jobs.
*
* @param taskExecutor
*/
public void setTaskExecutor(TaskExecutor taskExecutor) {this.taskExecutor = taskExecutor;
} | 3.26 |
Activiti_SpringAsyncExecutor_setRejectedJobsHandler_rdh | /**
* Required spring injected {@link SpringRejectedJobsHandler} implementation that will be used when jobs were rejected by the task executor.
*
* @param rejectedJobsHandler
*/ public void setRejectedJobsHandler(SpringRejectedJobsHandler rejectedJobsHandler) {
this.rejectedJobsHandler = rejectedJobsHandler;
... | 3.26 |
Activiti_ReflectUtil_m0_rdh | /**
* Returns the field of the given class or null if it doesn't exist.
*/
public static Field m0(String fieldName, Class<?> clazz) {
Field field = null;
try {
field = clazz.getDeclaredField(fieldName);
} catch (SecurityException e) {
throw new ActivitiException((("no... | 3.26 |
Activiti_ReflectUtil_getField_rdh | /**
* Returns the field of the given object or null if it doesn't exist.
*/public static Field getField(String fieldName, Object object) {
return m0(fieldName, object.getClass());
} | 3.26 |
Activiti_ReflectUtil_getSetter_rdh | /**
* Returns the setter-method for the given field name or null if no setter exists.
*/
public static Method getSetter(String fieldName, Class<?> clazz, Class<?> fieldType) {
String setterName = ("set" + Character.toTitleCase(fieldName.charAt(0))) + fieldName.substring(1, fieldName.length());
try {
/... | 3.26 |
Activiti_DefaultDeploymentCache_size_rdh | // For testing purposes only
public int size() {
return cache.size();
} | 3.26 |
Activiti_NativeExecutionQueryImpl_executeList_rdh | // results ////////////////////////////////////////////////////////////////
public List<Execution> executeList(CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults) {
return commandContext.getExecutionEntityManager().findExecutionsByNativeQuery(parameterMap, firstResult, ... | 3.26 |
Activiti_RootPropertyResolver_getProperty_rdh | /**
* Get property value
*
* @param property
* property name
* @return value associated with the given property
*/
public Object getProperty(String property) {
return map.get(property);
} | 3.26 |
Activiti_RootPropertyResolver_properties_rdh | /**
* Get properties
*
* @return all property names (in no particular order)
*/ public Iterable<String> properties() {
return map.keySet();
} | 3.26 |
Activiti_RootPropertyResolver_isProperty_rdh | /**
* Test property
*
* @param property
* property name
* @return <code>true</code> if the given property is associated with a value
*/
public boolean isProperty(String property) {
return map.containsKey(property);
} | 3.26 |
Activiti_RootPropertyResolver_setProperty_rdh | /**
* Set property value
*
* @param property
* property name
* @param value
* property value
*/
public void setProperty(String property, Object value) {
map.put(property, value);
} | 3.26 |
Activiti_CollectionUtil_mapOfClass_rdh | /**
* Helper method to easily create a map with keys of type String and values of a given Class. Null values are allowed.
*
* @param clazz
* the target Value class
* @param objects
* varargs containing the key1, value1, key2, value2, etc. Note: although an Object, we will cast the key to String internally
* ... | 3.26 |
Activiti_CollectionUtil_singletonMap_rdh | /**
* Helper method that creates a singleton map.
*
* Alternative for singletonMap()), since that method returns a generic typed map <K,T> depending on the input type, but we often need a <String, Object> map.
*/public static Map<String, Object> singletonMap(String key, Object value) {
Map<S... | 3.26 |
Activiti_BpmnActivityBehavior_performOutgoingBehavior_rdh | /**
* Actual implementation of leaving an activity.
*
* @param execution
* The current execution context
* @param checkConditions
* Whether or not to check conditions before determining whether or not to take a transition.
* @param throwExceptionIfExecutionStuck
* If true, an {@link ActivitiException} wil... | 3.26 |
Activiti_BpmnActivityBehavior_dispatchJobCanceledEvents_rdh | /**
* dispatch job canceled event for job associated with given execution entity
*
* @param activityExecution
*/
protected void dispatchJobCanceledEvents(ExecutionEntity activityExecution) {
if (activityExecution != null) {
List<JobEntity> jobs = activityExecution.getJo... | 3.26 |
Activiti_BpmnActivityBehavior_performDefaultOutgoingBehavior_rdh | /**
* Performs the default outgoing BPMN 2.0 behavior, which is having parallel paths of executions for the outgoing sequence flow.
* <p>
* More precisely: every sequence flow that has a condition which evaluates to true (or which doesn't have a condition), is selected for continuation of the process instance. If mu... | 3.26 |
Activiti_BpmnParse_applyParseHandlers_rdh | /**
* Parses the 'definitions' root element
*/
protected void applyParseHandlers() {
sequenceFlows = new HashMap<String, SequenceFlow>();
for (Process process : bpmnModel.getProcesses()) {
currentProcess
= process;
if (process.isExecutable()) {
bpmnParserHandlers.parseElem... | 3.26 |
Activiti_BpmnParse_processDI_rdh | // Diagram interchange
// /////////////////////////////////////////////////////////////////
public void processDI() {
if (processDefinitions.isEmpty()) {
return;
}
if (!bpmnModel.getLocationMap().isEmpty()) {
// Verify if all referenced elements exist
for (String bpmnReference : bpmnModel.getLocationMap().... | 3.26 |
Activiti_BpmnParse_isValidateSchema_rdh | /* ------------------- GETTERS AND SETTERS ------------------- */
public boolean isValidateSchema() {
return validateSchema;
} | 3.26 |
Activiti_ExecutionTreeStringBuilder_toString_rdh | /* See http://stackoverflow.com/questions/4965335/how-to-print-binary-tree-diagram */@Override
public String toString() {
StringBuilder strb = new StringBuilder();
strb.append(executionEntity.getId()).append(" : ").append(executionEntity.getActivityId()).append(", parent id ").append(executionEntity.g... | 3.26 |
Activiti_ExecutionTree_getTreeNode_rdh | /**
* Looks up the {@link ExecutionEntity} for a given id.
*/
public ExecutionTreeNode getTreeNode(String executionId) {
return getTreeNode(executionId, root);
} | 3.26 |
Activiti_ExecutionTree_leafsFirstIterator_rdh | /**
* Uses an {@link ExecutionTreeBfsIterator}, but returns the leafs first (so flipped order of BFS)
*/
public ExecutionTreeBfsIterator leafsFirstIterator() {
return
new ExecutionTreeBfsIterator(this.getRoot(), true);
} | 3.26 |
Activiti_DelegateInvocation_getInvocationParameters_rdh | /**
*
* @return an array of invocation parameters (null if the invocation takes no parameters)
*/
public Object[] getInvocationParameters() {
return invocationParameters;
} | 3.26 |
Activiti_DelegateInvocation_proceed_rdh | /**
* make the invocation proceed, performing the actual invocation of the user code.
*
* @throws Exception
* the exception thrown by the user code
*/
public void proceed() {invoke();
} | 3.26 |
Activiti_DelegateInvocation_getInvocationResult_rdh | /**
*
* @return the result of the invocation (can be null if the invocation does not return a result)
*/
public Object getInvocationResult() {
return invocationResult;
} | 3.26 |
Activiti_ByteArrayEntityImpl_getName_rdh | // getters and setters ////////////////////////////////////////////////////////
public String getName() {
return name;
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.