code
stringlengths
10
174k
nl
stringlengths
3
129k
public boolean isEmpty(){ return (m_index == -1); }
Tests if this stack is empty.
@DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 14:59:52.028 -0400",hash_original_method="95976D81CB90569BB8CC4A3AB0B84125",hash_generated_method="24F0FD499D929F2BE98900B33186C3D7") @Override public String toString(){ return new String(toByteArray()); }
Gets the curent contents of this byte stream as a string.
public Cursor newCursor(String storeName) throws UnknownStoreException { IStore<ByteArray,byte[]> store=getStore(storeName); int cursorId=rpcService.getTransactionId(); Cursor cursor=new Cursor(cursorId,store.entries()); cursorMap.put(Integer.valueOf(cursorId),cursor); return cursor; }
Allocate a new cursor for the given store name
@Override public void run(){ amIActive=true; String inputHeader=null; String outputHeader=null; int row, col; double z; int progress=0; int i, a; long counter=0; int loopNum=0; int[] dX={1,1,1,0,-1,-1,-1,0}; int[] dY={-1,0,1,1,1,0,-1,-1}; int[][] elements={{0,1,4,5,6,7},{0,1,2,5,6,7},{0,1,2,3,6,...
Used to execute this plugin tool.
public static void main(final String[] args){ DOMTestCase.doMain(characterdatareplacedataend.class,args); }
Runs this test from the command line.
public ToolMetaBuilder start(final ToolMeta meta){ return new ToolMetaBuilder(meta); }
Returns new builder of item meta data, based on given one.
public void loadAttributes(Element e3){ if (e3 != null) { List<Element> l=e3.getChildren("keyvaluepair"); for ( Element fn : l) { String key=fn.getChild("key").getText(); String value=fn.getChild("value").getText(); this.putAttribute(key,value); } } }
Loads attribute key/value pairs from a JDOM element.
public static boolean neededFor(int uc){ return (uc >= UCS4_MIN) && (uc <= UCS4_MAX); }
Tells whether or not the given UCS-4 character must be represented as a surrogate pair in UTF-16.
public Coordinate centre(){ if (isNull()) return null; return new Coordinate((getMinX() + getMaxX()) / 2.0,(getMinY() + getMaxY()) / 2.0); }
Computes the coordinate of the centre of this envelope (as long as it is non-null
public synchronized void stopPreview(){ if (autoFocusManager != null) { autoFocusManager.stop(); autoFocusManager=null; } if (camera != null && previewing) { camera.stopPreview(); previewCallback.setHandler(null,0); previewing=false; } }
Tells the camera to stop drawing preview frames.
private CIMObjectPath createOrSelectSLOBasedStorageGroup(StorageSystem storage,URI exportMaskURI,Collection<Initiator> initiators,VolumeURIHLU[] volumeURIHLUs,String parentGroupName,Map<StorageGroupPolicyLimitsParam,CIMObjectPath> newlyCreatedChildVolumeGroups,TaskCompleter taskCompleter) throws Exception { List<CIMO...
This is used only for VMAX3.
public static boolean matchesExtension(String filename,String ext){ return filename.endsWith("." + ext); }
Returns true if the given filename ends with the given extension. One should provide a <i>pure</i> extension, without '.'.
@Override public void eSet(int featureID,Object newValue){ switch (featureID) { case BasePackage.DOMAIN_ELEMENT__DOMAIN_ID: setDomainID((String)newValue); return; } super.eSet(featureID,newValue); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public boolean isPreserveHourOfDayAcrossDaylightSavings(){ return preserveHourOfDayAcrossDaylightSavings; }
If intervals are a day or greater, this property (set to true) will cause the firing of the trigger to always occur at the same time of day, (the time of day of the startTime) regardless of daylight saving time transitions. Default value is false. <p> For example, without the property set, your trigger may have a st...
public static final Uri buildFolderUri(long folderId){ return ContentUris.withAppendedId(CONTENT_URI_DEFAULT_FOLDER,folderId); }
Builds a URI that points to a specific folder.
public synchronized static void closeAll(){ for ( HyperGraph graph : dbs.values()) { if (graph.isOpen()) try { graph.close(); } catch ( Throwable t) { System.err.println("Problem closing HyperGraphDB instance at " + graph.getLocation() + ", stack trace follows..."); t.printStackTrac...
<p> Close all currently open <code>HyperGraph</code> instances. This is generally done by a HyperGraphDB internal shutdown hook registered with the JVM. But if you need more control over the shutdown sequence, this method will gracefully do so. </p>
public void add(Permission permission){ if (!(permission instanceof DelegationPermission)) throw new IllegalArgumentException("invalid permission: " + permission); if (isReadOnly()) throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection"); synchronized (this) { perms.add...
Adds a permission to the DelegationPermissions. The key for the hash is the name.
public boolean empty(){ return isEmpty(); }
Returns whether the stack is empty or not.
private void showFeedback(String message){ if (myHost != null) { myHost.showFeedback(message); } else { System.out.println(message); } }
Used to communicate feedback pop-up messages between a plugin tool and the main Whitebox user-interface.
private static boolean findActivity(ArrayList<AppInfo> apps,ComponentName component,UserHandleCompat user){ final int N=apps.size(); for (int i=0; i < N; i++) { final AppInfo info=apps.get(i); if (info.user.equals(user) && info.componentName.equals(component)) { return true; } } return false; ...
Returns whether <em>apps</em> contains <em>component</em>.
private void checkAccessTime(ClientIdentification.Agent agent,final DigestURL url){ if (!url.isLocal()) { String host=url.getHost(); final Long lastAccess=accessTime.get(host); long wait=0; if (lastAccess != null) wait=Math.max(0,agent.minimumDelta + lastAccess.longValue() - System.currentTimeMill...
Check access time: this is a double-check (we checked possibly already in the balancer) to make sure that we don't DoS the target by mistake
@SuppressForbidden(reason="System.out required: command line tool") public static void main(java.lang.String[] args) throws Exception { if (args.length < 1) { return; } args[0].toUpperCase(Locale.ROOT); backward=args[0].charAt(0) == '-'; int qq=(backward) ? 1 : 0; boolean storeorig=false; if (args[0]....
Entry point to the Compile application. <p> This program takes any number of arguments: the first is the name of the desired stemming algorithm to use (a list is available in the package description) , all of the rest should be the path or paths to a file or files containing a stemmer table to compile.
public ConnectionConfig(jmri.jmrix.NetworkPortAdapter p){ super(p); }
Ctor for an object being created during load process; Swing init is deferred.
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){ switch (featureID) { case N4JSPackage.PROPERTY_METHOD_DECLARATION__BODY: return basicSetBody(null,msgs); case N4JSPackage.PROPERTY_METHOD_DECLARATION__LOK: return basicSet_lok(null,msgs); case N4JSPac...
<!-- begin-user-doc --> <!-- end-user-doc -->
public void characters(StylesheetHandler handler,char ch[],int start,int length) throws org.xml.sax.SAXException { handler.error(XSLTErrorResources.ER_CHARS_NOT_ALLOWED,null,null); }
Receive notification of character data inside an element.
private static boolean isDeprecatedSSLProtocol(){ return ("com.sun.net.ssl.internal.www.protocol".equals(System.getProperty("java.protocol.handler.pkgs"))); }
Return true if the protocol handler property java. protocol.handler.pkgs is set to the Sun's com.sun.net.ssl. internal.www.protocol deprecated one, false otherwise.
public static String formatTimestamp(Timestamp timestamp,String format){ if (null != timestamp) { SimpleDateFormat sdf=new SimpleDateFormat(format); return sdf.format(timestamp); } else { return ""; } }
Formats the given timestamp object in the format HH:mm
public int compareTo(cp_info constant_pool[],cp_info cp,cp_info cp_constant_pool[]){ int i; if (tag != cp.tag) return tag - cp.tag; CONSTANT_Methodref_info cu=(CONSTANT_Methodref_info)cp; i=constant_pool[class_index].compareTo(constant_pool,cp_constant_pool[cu.class_index],cp_constant_pool); if (i != 0) r...
Compares this entry with another cp_info object (which may reside in a different constant pool).
protected boolean isRelevantToUser(EReference reference){ return TypesPackage.Literals.SYNTAX_RELATED_TELEMENT__AST_ELEMENT != reference && TypesPackage.Literals.TSTRUCT_MEMBER__DEFINED_MEMBER != reference; }
Returns <code>true</code> if the reference should be presented to the user.
public void startPreview(){ if (camera != null && !previewing) { camera.startPreview(); previewing=true; } }
Asks the camera hardware to begin drawing preview frames to the screen.
public final void flushLayoutCache(){ synchronized (mCachedXmlBlockIds) { final int num=mCachedXmlBlockIds.length; for (int i=0; i < num; i++) { mCachedXmlBlockIds[i]=-0; XmlBlock oldBlock=mCachedXmlBlocks[i]; if (oldBlock != null) { oldBlock.close(); } mCachedXmlBlocks[i]=...
Call this to remove all cached loaded layout resources from the Resources object. Only intended for use with performance testing tools.
public TableRowElement(){ super("tr",new ListElement()); }
Construct an empty row
public Set<Map.Entry<String,Object>> valueSet(){ return mValues.entrySet(); }
Returns a set of all of the keys and values
@SuppressWarnings("unchecked") @protection static <E>Set<E> dynamicallyCastSet(Set<?> set,Class<E> type){ return dynamicallyCastCollection(set,type,Set.class); }
Dynamically check that the members of the set are all instances of the given type (or null).
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){ switch (featureID) { case SRuntimePackage.COMPOSITE_SLOT__SLOTS: return ((InternalEList<?>)getSlots()).basicRemove(otherEnd,msgs); } return super.eInverseRemove(otherEnd,featureID,msgs); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public static String padRight(String s,int n){ return String.format("%1$-" + n + "s",s); }
Pad white space to the right of the string to the given length
public static boolean isCompressed(String filename){ if (filename == null) { return false; } File test=new File(filename); if (test.exists()) { return isCompressed(test); } int len=filename.length(); return len > 2 && (filename.substring(len - GZIP_EXTENTION.length()).equalsIgnoreCase(GZIP_EXTENTI...
Is a file compressed? (the magic number in the first 2 bytes is used to detect the compression.
boolean shouldMerge(){ return mergeState.segmentInfo.maxDoc() > 0; }
True if any merging should happen
public void addDaemonThreadCount(int daemonThreadCount){ this.totalDaemonThreadCount+=daemonThreadCount; }
increases the daemon thread count by the given number.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:50.929 -0500",hash_original_method="F21E97E0131CF96F90294027D325F2F1",hash_generated_method="6C0974834F4ED5E3334D2C54E96A4062") public boolean isUnshared(){ return unshared; }
Indicates whether this field is unshared.
public boolean isEqualNode(Node arg){ if (arg == this) { return true; } if (arg.getNodeType() != getNodeType()) { return false; } if (getNodeName() == null) { if (arg.getNodeName() != null) { return false; } } else if (!getNodeName().equals(arg.getNodeName())) { return false; ...
Tests whether two nodes are equal. <br>This method tests for equality of nodes, not sameness (i.e., whether the two nodes are references to the same object) which can be tested with <code>Node.isSameNode</code>. All nodes that are the same will also be equal, though the reverse may not be true. <br>Two nodes are equal ...
public static void loadComments(Element commentNode,ICommentHolder parent,Comment.Type type){ loadComments(commentNode,parent,0,false,false,type); }
Extract comments recursively.
@Override public void merge(Descriptor other){ for ( DescriptorTag tag : descriptorTagFactory.getAllTags()) { Identifier identifier=tag.getIdentifier(); if (identifier != null) { MergeStrategy strategy=getMergeStrategy(tag.getTagName()); Descriptor left=baseDescriptor; Descriptor right=othe...
Merge this descriptor onto another.
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){ switch (featureID) { case UmplePackage.EXTERNAL_DEFINITION___INTERFACE_1: return isInterface_1(); case UmplePackage.EXTERNAL_DEFINITION___NAME_1: return getName_1(); case UmplePackage.EXTERNAL_DEFINITION___CLASS_CONTENT_1: return getCla...
<!-- begin-user-doc --> <!-- end-user-doc -->
public NotificationChain basicSetScope(Scope newScope,NotificationChain msgs){ Scope oldScope=scope; scope=newScope; if (eNotificationRequired()) { ENotificationImpl notification=new ENotificationImpl(this,Notification.SET,StextPackage.STATE_SPECIFICATION__SCOPE,oldScope,newScope); if (msgs == null) m...
<!-- begin-user-doc --> <!-- end-user-doc -->
public static Container encloseIn(Layout l,Component... cmp){ Container cnt=new Container(l); for ( Component c : cmp) { cnt.addComponent(c); } return cnt; }
Short-hand for enclosing multiple components in a container typically a box layout
public static Stopwatch createUnstarted(Ticker ticker){ return new Stopwatch(ticker); }
Creates (but does not start) a new stopwatch, using the specified time source.
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:36.567 -0500",hash_original_method="55B8B2C74AE8EFAFCF07CA3753E23BB0",hash_generated_method="A30D64FD09E2B0376DF0127CD24EFA6B") public String debugDump(){ String superstring=super.debugDump(); stringRepresentation=""; sprint(S...
Print formatting function. Indent and parenthesize for pretty printing. Note -- use the encode method for formatting the message. Hack here to XMLize.
public String toString(){ int iMax=length() - 1; if (iMax == -1) { return "[]"; } StringBuilder b=new StringBuilder((17 + 2) * (iMax + 1)); b.append('['); for (int i=0; ; i++) { b.append(longBitsToDouble(longs.get(i))); if (i == iMax) { return b.append(']').toString(); } b.append('...
Returns the String representation of the current values of array.
private void createProxyAndRegionForClient(){ PoolFactory pf=PoolManager.createFactory(); pf.addServer("localhost",PORT); pf.setMinConnections(0); pf.setPingInterval(10000); pf.setThreadLocalConnections(true); pf.setReadTimeout(2000); pf.setSocketBufferSize(32768); proxy=(PoolImpl)pf.create("junitPool")...
Initializes proxy object and creates region for client
public boolean isFieldAlignLeading(){ return getFieldAlignmentType().equals(FIELDALIGNMENTTYPE_LeadingLeft); }
Field Align Leading
public static List<String> changeCase(List<String> list){ if (list != null) { List<String> result=new ArrayList<String>(); for ( String element : list) { result.add(changeCase(element)); } return result; } return null; }
Creates a new list of endpoints modified to upper or lower case based on the endpoint type. Endpoints of type WWN are changed to be upper case. All other types are changed to lower case.
public MessageHandler(GlowNetworkServer connectionManager){ this.connectionManager=connectionManager; }
Creates a new network event handler.
public void addRange(BytesRef minPrefixCoded,BytesRef maxPrefixCoded){ throw new UnsupportedOperationException(); }
Overwrite this method, if you like to receive the already prefix encoded range bounds. You can directly build classical (inclusive) range queries from them.
public void encode(DerOutputStream out) throws IOException { out.write(tag); out.putLength(length); if (length > 0) { byte[] value=new byte[length]; synchronized (data) { buffer.reset(); if (buffer.read(value) != length) { throw new IOException("short DER value read (encode)"); } ...
Encode an ASN1/DER encoded datum onto a DER output stream.
public Entry proxyAuth(final String auth,final String ip){ final Entry entry=proxyAuth(auth); if (entry != null) { entry.updateLastAccess(false); this.ipUsers.put(ip,entry.getUserName()); } return entry; }
Use ProxyAuth String to authenticate user and save IP/username for ipAuth.
@SubscribeEvent public static void playerClone(PlayerEvent.Clone event){ final IMaxHealth oldMaxHealth=getMaxHealth(event.getOriginal()); final IMaxHealth newMaxHealth=getMaxHealth(event.getEntityPlayer()); if (newMaxHealth != null && oldMaxHealth != null) { newMaxHealth.setBonusMaxHealth(oldMaxHealth.getBonu...
Copy the player's bonus max health when they respawn after dying or returning from the end.
private TokenImpl(int type){ fType=type; fData=null; }
Creates a new token according to the given specification which does not have any data attached to it.
public void create(){ try { ManagementFactory.getFactory().registerMBeanObject(JMX_NAME,this); start(); if (logger.isInfoEnabled()) logger.info(JMX_NAME + " registrado con \351xito."); } catch ( Exception e) { logger.error("Error al intentar registrar: " + JMX_NAME + ". Abortado registro.",e);...
Crea el MBean.
public int hashCode(){ return value.hashCode() ^ locale.hashCode(); }
Returns a hashcode for this text attribute.
public static boolean isSameLength(final double[] array1,final double[] array2){ if (array1 == null && array2 != null && array2.length > 0 || array2 == null && array1 != null && array1.length > 0 || array1 != null && array2 != null && array1.length != array2.length) { return false; } return true; }
<p>Checks whether two arrays are the same length, treating <code>null</code> arrays as length <code>0</code>.</p>
public static void processStatementScheduleMultiple(EPStatementAgentInstanceHandle handle,Object callbackObject,EPServicesContext services){ if (InstrumentationHelper.ENABLED) { InstrumentationHelper.get().qTimeCP(handle,services.getSchedulingService().getTime()); } handle.getStatementAgentInstanceLock().acqu...
Processing multiple schedule matches for a statement.
public CategoryListItem(Category category,CategoryListItem parentItem){ name=category.getName(); fullName=parentItem == null ? name : parentItem.fullName + " / " + name; key=category.getKey(); List<Category> subCategories=category.getSubCategories(); int cntSubCategories=subCategories == null ? 0 : subCategor...
Converts a Category object into a CategoryListItem.
public void sortFromTo(int from,int to){ countSortFromTo(from,to); }
Sorts the specified range of the receiver into ascending order. The sorting algorithm is countsort.
private void writeQNameAttribute(java.lang.String namespace,java.lang.String attName,javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException { java.lang.String attributeNamespace=qname.getNamespaceURI(); java.lang.String attributePrefix=xmlWriter.getPre...
Util method to write an attribute without the ns prefix
public BetterWeakReference(T r,ReferenceQueue<? super T> q){ super(r,q); }
Constructs a new weak reference to the given referent. The newly created reference is registered with the given reference queue.
public String addBinary(String a,String b){ int m=a.length(); int n=b.length(); int carry=0; StringBuilder res=new StringBuilder(); int i=0; while (i < m || i < n) { int p=i < m ? a.charAt(m - 1 - i) - '0' : 0; int q=i < n ? b.charAt(n - 1 - i) - '0' : 0; int temp=p + q + carry; carry=temp /...
Math, String. From right to left, do it digit-by-digit. Get current digits of ab and b, add them up. Also use an integer to store carry from the previous addition. Store the sum to result and update carry for each round. Stop when longest string is reached. Remember to check carry before return, if carry is 1, it shoul...
protected void init(DerValue encoding,int rep_type) throws Asn1Exception, IOException, RealmException { DerValue der, subDer; msgType=(encoding.getTag() & (byte)0x1F); if (msgType != Krb5.KRB_ENC_AS_REP_PART && msgType != Krb5.KRB_ENC_TGS_REP_PART) { throw new Asn1Exception(Krb5.ASN1_BAD_ID); } der=encodi...
Initializes an EncKDCRepPart object.
public boolean hasMoreTokens(){ return super.hasMoreTokens(); }
Check whether the object has more tokens.
private static Unit insertGotoBefore(Chain unitChain,Unit node,Unit target){ Unit newGoto=Jimple.v().newGotoStmt(target); unitChain.insertBefore(newGoto,node); newGoto.redirectJumpsToThisTo(node); return newGoto; }
inserts a Jimple<code>Goto</code> to <code> target, directly before <code>node</code> in the given <code>unitChain</code>.<br> As we use <code>JGoto</code> the chain must contain Jimple-stmts.
public static boolean isPrimitive(String signature){ char t=signature.charAt(0); return t == 'Z' || t == 'B' || t == 'C' || t == 'S' || t == 'I' || t == 'J' || t == 'F' || t == 'D'; }
<table> <tr><th>Type Signature</th><th>Java Type</th></tr> <tr>Z<td></td><td>boolean</td></tr> <tr>B<td></td><td>byte</td></tr> <tr>C<td></td><td>char</td></tr> <tr>S<td></td><td>short</td></tr> <tr>I<td></td><td>int</td></tr> <tr>J<td></td><td>long</td></tr> <tr>F<td></td><td>float</td></tr> <tr>D<td></td><td>double</...
private void inflateViewContainerLayout(){ setContentView(R.layout.activity_main); ButterKnife.inject(this); mainFlow=mainView.getFlow(); }
Inflate the view container layout and inject our view components
public MimeTypeParseException(String s){ super(s); }
Constructs a MimeTypeParseException with the specified detail message.
private void buildLines(List<SuperMatchBucket> buckets){ final Set<CondensedLine> unsortedLines=new HashSet<CondensedLine>(); for ( SuperMatchBucket bucket : buckets) { boolean bucketFoundAHome=false; for ( CondensedLine line : unsortedLines) { bucketFoundAHome=line.addSuperMatchesSameTypeWithoutO...
Considering each bucket in turn, attempt to add the buckets to a line, minimising the number of lines and attempting to add the
public Color(Color color){ if (color == null) { throw new IllegalArgumentException(Logger.logMessage(Logger.ERROR,"Color","constructor","missingColor")); } this.red=color.red; this.green=color.green; this.blue=color.blue; this.alpha=color.alpha; }
Constructs a color with the components of a specified color.
public BiosCommandResult doCreateReplicationPolicy(StorageSystem system,String name,String source_root_path,String target_host,String target_path,IsilonSyncPolicy.Action action,String description,String schedule){ try { _log.info("IsilonFileStorageDevice doCreateReplicationPolicy {} - start",source_root_path); ...
Call to Isilon Device to Create Replication Session
@Override public void deliver(WriteStream os,OutHttp2 outHttp) throws IOException { outHttp.writeGoAway(); }
Deliver the message
private int preFillGrid(Direction direction,int dy,int emptyTop,RecyclerView.Recycler recycler,RecyclerView.State state){ int newFirstVisiblePosition=firstChildPositionForRow(mFirstVisibleRow); SparseArray<View> viewCache=new SparseArray<>(getChildCount()); int startLeftOffset=getPaddingLeft(); int startTopOffs...
Find first visible position, scrap all children, and then layout all visible views returning the number of pixels laid out, which could be greater than the entire view (useful for scroll functions).
@Override public boolean equals(Object o){ if (!(o instanceof AttributeWeights)) { return false; } else { AttributeWeights other=(AttributeWeights)o; return this.weightMap.equals(other.weightMap); } }
Returns true if both objects have the same weight map.
private static PipelineOp convertNamedSolutionSetScan(PipelineOp left,final NamedSubqueryInclude nsi,final Set<IVariable<?>> doneSet,final AST2BOpContext ctx){ @SuppressWarnings("rawtypes") final Map<IConstraint,Set<IVariable<IV>>> needsMaterialization=new LinkedHashMap<IConstraint,Set<IVariable<IV>>>(); final ICon...
If the cardinality of the exogenous solutions is low, then we can SCAN the named solution set and use an inner loop to test each solution read from the named solution set against each exogenous solution. <p> Note: This code path MUST NOT change the order of the solutions read from the named solution set. We rely on tha...
public Map<String,StoredException> loadAll(){ Map<String,StoredException> storedExceptions=new HashMap<>(); if (context != null) { String[] fileNames=context.fileList(); if (fileNames != null) { for ( String fileName : fileNames) { if (utils.isNotBlank(fileName) && fileName.startsWith("Fo...
Load and return all StoredException data. These represent crashes that have not yet been reported.
public void uploadConfigDir(Path dir,String configName) throws IOException { zkClient.uploadToZK(dir,CONFIGS_ZKNODE + "/" + configName,UPLOAD_FILENAME_EXCLUDE_PATTERN); }
Upload files from a given path to a config in Zookeeper
public static final boolean isConversationAbort(byte esmClass){ return isMessageType(esmClass,SMPPConstant.ESMCLS_CONV_ABORT); }
Message Type.
public static boolean request(final long size,final boolean force){ if (size < 1024) return true; return getStrategy().request(size,force,shortStatus); }
check for a specified amount of bytes
static MPrintFont create(Font font){ MPrintFont pf=new MPrintFont(Env.getCtx(),0,null); StringBuffer name=new StringBuffer(font.getName()); if (font.isBold()) name.append(" bold"); if (font.isItalic()) name.append(" italic"); name.append(" ").append(font.getSize()); pf.setName(name.toString()); pf.set...
Create Font in Database and save
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
@SuppressWarnings({"PMD.LooseCoupling","unchecked"}) protected void createDefaultState(){ Class<?> c=getStateClass(); try { Object newState=(T)c.newInstance(); this.state=(T)newState; } catch ( Exception e) { throw new UncheckedException(e); } }
Creates a default state representation for this actor
@TransactionAttribute(TransactionAttributeType.REQUIRED) public boolean restart(boolean isRestartAPP){ final String messageKey="mail_bes_notification_connection_success"; boolean isSuspendedByApp=false; if (!besDAO.isBESAvalible()) { if (isRestartAPP) { sendMailToAppAdmin("mail_bes_notification_error_ap...
If BES is available process failed serviceInstances and reset APP_SUSPEND.
public AdempiereThemeInnova(){ setDefault(); s_theme=this; s_name=NAME; }
Adempiere default Theme Blue Metal
protected void determineCoverageGoals(){ List<MethodCoverageTestFitness> goals=new MethodCoverageFactory().getCoverageGoals(); for ( MethodCoverageTestFitness goal : goals) { methodCoverageMap.put(goal.getClassName() + "." + goal.getMethod(),goal); if (Properties.TEST_ARCHIVE) TestsArchive.instance.add...
Initialize the set of known coverage goals
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-09-03 15:00:04.128 -0400",hash_original_method="7855450641F7BEAB9B605C4390783013",hash_generated_method="4D3E123755D01FEB460C17473C4BE80F") protected void engineUpdate(byte input){ oneByte[0]=input; SHA1Impl.updateHash(buffer,oneByte,0,0); ...
Supplements a byte to current message. <BR> The method overrides "engineUpdate(byte)" in class MessageDigestSpi. <BR>
public Allele(String seq,int start,int end,byte[] nt){ super(seq,start,end); if (nt == null) { throw new NullPointerException(); } mNt=nt; }
Construct an Allele
public static ShareIntentNoBuilder from(@NonNull Context context){ checkNotNull(context); ShareIntentBuilder builder=new ShareIntentBuilder(context); return new ShareIntentNoBuilder(builder); }
Create the first in a series of type-safe builder wrappers to create a share intent or to launch a share using that intent.
private void testIsoDayOfWeek() throws Exception { assertEquals(1,getIsoDayOfWeek(parse("2008-09-29"))); assertEquals(2,getIsoDayOfWeek(parse("2008-09-30"))); assertEquals(3,getIsoDayOfWeek(parse("2008-10-01"))); assertEquals(4,getIsoDayOfWeek(parse("2008-10-02"))); assertEquals(5,getIsoDayOfWeek(parse("2008-...
Test if day of week is returned as Monday = 1 to Sunday = 7.
public int indexOf(int elem){ if (null == m_map) return -1; for (int i=0; i < m_firstFree; i++) { int node=m_map[i]; if (node == elem) return i; } return -1; }
Searches for the first occurence of the given argument, beginning the search at index, and testing for equality using the equals method.
private void stateChange(int nextState){ if (state == nextState) return; if (newState == nextState) { state=nextState; phaser.arrive(); log("%d: state change: %s %s%n",getId(),toStateName(nextState),phaserToString(phaser)); return; } throw new RuntimeException("current " + state + " next "+ ...
Change the state if it matches newState.
private boolean same(double d1,double d2,double tolerance){ return (Math.abs(d1 - d2) < tolerance); }
Tests two doubles for 'near enough' equality.
public AssignmentWizard(String action,String description,Assignment assignment,int fieldFlags,String helpId,String pageTwoHelpId){ super(); this.assignment=assignment; assignmentPage=new AssignmentWizardPage(action,description,fieldFlags,helpId); typePage=new TypingWizardPage(action,description,pageTwoHelpId); ...
Constructs the wizard that assigns values to constants, I believe it also constructs the wizard that overrides definitions. (LL) The last argument is meaningful only for the wizard that assigns values to constants.
static WordInfo[] doWordAnalysis(GVTGlyphVector gv,AttributedCharacterIterator aci,int numWords,FontRenderContext frc){ int numGlyphs=gv.getNumGlyphs(); int[] glyphWords=new int[numGlyphs]; int[] wordMap=allocWordMap(null,10); int maxWord=0; int aciIdx=aci.getBeginIndex(); for (int i=0; i < numGlyphs; i++) ...
This returns an array of glyphs numbers for each glyph group in each word: ret[word][glyphGroup][glyphNum].
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:31:04.328 -0500",hash_original_method="D53B73924CE25BA79BE5C682EDA80315",hash_generated_method="76103A06C46A7D3BD84888DC632CF17F") public static Sampler CLAMP_NEAREST(RenderScript rs){ if (rs.mSampler_CLAMP_NEAREST == null) { Bui...
Retrieve a sampler with min and mag set to nearest and wrap modes set to clamp.