code
stringlengths
10
174k
nl
stringlengths
3
129k
public final void dispose(){ for ( final IResultsPanel panel : m_factory) { panel.removeListener(m_internalPanelListener); panel.dispose(); } disposeInternal(); }
Frees allocated resources.
public ProfessionalExperience awards(List<Award> awards){ this.awards=awards; return this; }
Sets the list of user awards.
public int variant(){ return variant; }
<p> The variant of the UUID as per <a href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a>. <ul> <li>0 - Reserved for NCS compatibility</li> <li>2 - RFC 4122/Leach-Salz</li> <li>6 - Reserved for Microsoft Corporation compatibility</li> <li>7 - Reserved for future use</li> </ul>
public static boolean isEmpty(short[] array){ return array == null || array.length == 0; }
<p>Checks if an array of primitive shorts is empty or <code>null</code>.</p>
@Override public synchronized int lastIndexOf(Object object){ return lastIndexOf(object,elementCount - 1); }
Searches in this vector for the index of the specified object. The search for the object starts at the end and moves towards the start of this vector.
public static void UF6(double[] x,double[] f,int nx){ int count1=0; int count2=0; double sum1=0.0; double sum2=0.0; double prod1=1.0; double prod2=1.0; double yj; double hj; double pj; double N=2.0; double E=0.1; for (int j=2; j <= nx; j++) { yj=x[j - 1] - Math.sin(6.0 * PI * x[0] + j * PI /...
Evaluates the UF6 problem.
public PolarLocationAnimator(String group){ super(group); }
Creates a PolarLocationAnimator that operates on VisualItems within the specified group.
protected RegularStateImpl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
protected void destroyJMSResources(boolean reconnecting){ if (session != null && transacted && getIterations() != 0) { Log.logger.log(Level.FINE,"Rolling back any current transactions."); try { session.rollback(); } catch ( JMSException e1) { } } if (messageProducer != null) { if (!r...
Attempts to safely shutdown all JMS objects. <p>Also calls Session.rollback() to back out any incomplete units-of-work. This may look confusing to people....
@Override public DropGraph visit(final ASTDrop node,final Object data) throws VisitorException { final DropGraph op=new DropGraph(); if (node.isSilent()) op.setSilent(true); final ASTGraphRefAll graphRef=node.jjtGetChild(ASTGraphRefAll.class); if (graphRef.jjtGetNumChildren() > 0) { final TermNode targetG...
Note: DROP and CLEAR have the identical semantics for bigdata since it does not support empty graphs.
public boolean isOwned(){ Object oo=get_Value(COLUMNNAME_IsOwned); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; }
Get Owned.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:56:30.254 -0500",hash_original_method="5329D88830912459D833DA651EF25565",hash_generated_method="978F13491909EB135627806DA513B029") public static Long valueOf(String string) th...
Parses the specified string as a signed decimal long value.
@Override protected void drawFirstPassShape(Graphics2D g2,int pass,int series,int item,Shape shape){ if (isShadowPass(pass)) { if (getWallPaint() != null) { g2.setStroke(getItemStroke(series,item)); g2.setPaint(getWallPaint()); g2.translate(getXOffset(),getYOffset()); g2.draw(shape); ...
Overrides the method in the subclass to draw a shadow in the first pass.
private static boolean isLocalTcpPortFree(int port){ boolean res=false; try { SocketServerConnection conn=NetworkFactory.getFactory().createSocketServerConnection(); conn.open(port); conn.close(); res=true; } catch ( IOException e) { res=false; } return res; }
Test if the given local TCP port is really free (not used by other applications)
private Register compile(AST ast){ try { return (Register)ast.accept(this); } catch ( CompilerException e) { throw e; } catch ( Error e) { throw new CompilerException(ast,e); } catch ( RuntimeException e) { throw new CompilerException(ast,e); } }
Visit a node and return its result as a Register
public void testWrapAroundMode(){ withTerminalSized(3,3).enterString("abcd").assertLinesAre("abc","d "," "); withTerminalSized(3,3).enterString("\033[?7labcd").assertLinesAre("abd"," "," "); enterString("efg").assertLinesAre("abg"," "," "); enterString("\033[?7hhij").assertLinesAre("abh","ij "," ")...
DECSET 7, DECAWM, controls wraparound mode.
private void notifyUploadStart(UploadFileOperation upload){ mLastPercent=0; mNotificationBuilder=NotificationBuilderWithProgressBar.newNotificationBuilderWithProgressBar(this); mNotificationBuilder.setOngoing(true).setSmallIcon(R.drawable.notification_icon).setTicker(getString(R.string.uploader_upload_in_progress...
Creates a status notification to show the upload progress
public static char[] convertBytes2Uint8s(byte[] bytes){ int len=bytes.length; char[] uint8s=new char[len]; for (int i=0; i < len; i++) { uint8s[i]=convertByte2Uint8(bytes[i]); } return uint8s; }
Convert byte[] into char[]( we treat char[] as uint8[])
public String toString(){ return getClass().getName() + "[value=" + value+ "]"; }
Returns the String representation of this Annotation.
public FullMemberReference createFullMemberReference(){ FullMemberReferenceImpl fullMemberReference=new FullMemberReferenceImpl(); return fullMemberReference; }
<!-- begin-user-doc --> <!-- end-user-doc -->
public boolean isSetAnnotations(){ return this.annotations != null; }
Returns true if field annotations is set (has been assigned a value) and false otherwise
default PStackX<T> toPStackX(){ return PStackX.fromCollection(toList()); }
Returns a PStackX created with a list which is result of a get() call. If this get() returns null the the list is the empty list.
public boolean drop(){ boolean result=false; if (isPopulated()) { s_logger.log(Level.FINE,"dropThisObject",new Object[]{getObjectType(),m_name,m_parent.getDirection()}); Savepoint sp=m_parent.setSavepoint("drop_object"); result=m_interface.dropObject(s_parameters,s_logger,s_dbEngine,m_parent,m_name,m_he...
drop this object
public Message sendMessageSynchronously(Message msg){ Message resultMsg=SyncMessenger.sendMessageSynchronously(mDstMessenger,msg); return resultMsg; }
Send the Message synchronously.
public boolean isEndOfMonth(){ return equals(getLastDayOfMonth()); }
Checks if this date is at the end of the month. Returns true if the date is on the last day of the month, false otherwise.
public DetallePrevisionVO abrirDetallePrevision(String idDetallePrevision){ DetallePrevisionVO detallePrevision=getDetallePrevision(idDetallePrevision); if (detallePrevision == null) throw new UncheckedArchivoException("Detalle de prevision no encontrada en base de datos " + idDetallePrevision); PrevisionVO pre...
Pone un detalle de prevision a disposicion del usuario que solicita la apertura de manera que unicamente dicho usuario puede realizar acciones sobre el detalle
@Override protected void doAction(){ try { KeyStoreHistory history=kseFrame.getActiveKeyStoreHistory(); KeyStoreState currentState=history.getCurrentState(); String alias=kseFrame.getSelectedEntryAlias(); Password password=getEntryPassword(alias,currentState); if (password == null) { return;...
Do action.
public void waitForFirstMessageToArrive() throws InterruptedException { continueWhenFirstMessageHasArrivedLatch.countDown(); log.debug("(1) waiting for message latch = " + continueWhenFirstMessageHasArrivedLatch.getCount()); continueWhenFirstMessageHasArrivedLatch.await(); }
Continue when first actual message (not GET_INSTANCE) has arrived in onReceive
public synchronized Object remove(int index){ Object[] elements=getArray(); int len=elements.length; Object oldValue=elements[index]; int numMoved=len - index - 1; if (numMoved == 0) setArray(copyOf(elements,len - 1)); else { Object[] newElements=new Object[len - 1]; System.arraycopy(elements,0,new...
Removes the element at the specified position in this list. Shifts any subsequent elements to the left (subtracts one from their indices). Returns the element that was removed from the list.
public @Test final void testHashCodeEquals(){ User user1=new User(TEST_USER1); User user2=new User(TEST_USER1); User user3=new User(TEST_USER2); assertThat(user1).isEqualTo(user2); assertThat(user1).isEqualTo(user2); assertThat(user1).isNotEqualTo(user3); Set<User> users=new HashSet<>(); users.add(user1...
Test hashCode() and equals(obj).
@RequestMapping(value="/register",method=RequestMethod.POST,produces={MediaType.APPLICATION_JSON_VALUE,MediaType.TEXT_PLAIN_VALUE}) @Timed public ResponseEntity<?> registerAccount(@Valid @RequestBody UserDTO userDTO,HttpServletRequest request){ HttpHeaders textPlainHeaders=new HttpHeaders(); textPlainHeaders.setCon...
POST /register : register the user.
public TagException(Tag tag,String message){ super(tag + " " + message); }
<p class="changed_added_2_0">Wrap the argument <code>tag</code> so the exception can reference its information.</p>
public Map<String,String> parameters(){ Map<String,String> ret=new HashMap<String,String>(); if (getBusinessTransaction() != null) { ret.put("businessTransaction",getBusinessTransaction()); } if (getStartTime() > 0) { ret.put("startTime","" + getStartTime()); } if (getEndTime() > 0) { ret.put("e...
This method returns the criteria as a map of name/value pairs. The properties and correlation ids are returned as a single entry with | separators.
protected void drawValue(Canvas c,String value,float xPos,float yPos){ c.drawText(value,xPos,yPos,mValuePaint); }
Draws a value at the specified x and y position.
protected byte[] engineUpdate(byte[] input,int inputOffset,int inputLen){ return core.update(input,inputOffset,inputLen); }
Continues a multiple-part encryption or decryption operation (depending on how this cipher was initialized), processing another data part. <p>The first <code>inputLen</code> bytes in the <code>input</code> buffer, starting at <code>inputOffset</code>, are processed, and the result is stored in a new buffer.
public void read(NBTTagCompound nbtTags){ type=Gas.readFromNBT(nbtTags); amount=nbtTags.getInteger("amount"); }
Reads this GasStack's data from a defined tag compound.
public LineFunction2D(double a,double b){ this.a=a; this.b=b; }
Constructs a new line function.
private StringBuffer createKeyNamePair(String columnName,int displayType){ String method="get" + columnName + "()"; if (displayType != DisplayType.String) method="String.valueOf(" + method + ")"; StringBuffer sb=new StringBuffer(NL).append(" /** Get Record ID/ColumnName").append(NL).append(" @return I...
Create getKeyNamePair() method with first identifier
public NamespaceIdPart(final String id){ MustBe.notNull(id,"id"); this.id=id; if (!this.isValid()) { throw new IllegalArgumentException(String.format("'%s' is not a valid namespace id part.",this.id)); } }
Creates a namespace id part from a string.
@Override public synchronized boolean load(){ Xor<Void,T> oldData=data; String oldKey=versionedKey; try { if (isOutOfDate()) { String newVersionedKey=(String)connection.get(key).get(); data=Xor.primary((T)nonAtomicload(newVersionedKey)); versionedKey=newVersionedKey; } else { retu...
Load data from remote store if stale
public Solution(INode initial,INode goal,IDebugSearch debug,boolean success){ this(initial,goal,debug); this.success=success; }
Build solution with success or not.
public void generate(Queue<Pair<Env<AttrContext>,JCClassDecl>> queue){ generate(queue,null); }
Generates the source or class file for a list of classes. The decision to generate a source file or a class file is based upon the compiler's options. Generation stops if an error occurs while writing files.
public boolean isBorderOpaque(){ return true; }
Returns whether or not the border is opaque.
public Object[] toArray(){ return copyElements(new Object[size()]); }
Returns an array containing all of the elements in this deque in proper sequence (from first to last element). <p>The returned array will be "safe" in that no references to it are maintained by this deque. (In other words, this method must allocate a new array). The caller is thus free to modify the returned array. <...
public BootStateMachineMonitor(CounterService counterService,GaugeService gaugeService,TraceRepository traceRepository){ this.counterService=counterService; this.gaugeService=gaugeService; this.traceRepository=traceRepository; }
Instantiates a new boot state machine monitor.
public Base64(final boolean urlSafe){ this(MIME_CHUNK_SIZE,CHUNK_SEPARATOR,urlSafe); }
Creates a Base64 codec used for decoding (all modes) and encoding in the given URL-safe mode. <p> When encoding the line length is 76, the line separator is CRLF, and the encoding table is STANDARD_ENCODE_TABLE. </p> <p> When decoding all variants are supported. </p>
public void entityReference(String name) throws org.xml.sax.SAXException { flushPending(); startEntity(name); endEntity(name); if (m_tracer != null) fireEntityReference(name); }
Entity reference event.
@SuppressWarnings("unchecked") public static <T>T[] concat(T[] a,T[] b){ final int alen=a.length; final int blen=b.length; if (alen == 0) { return b; } if (blen == 0) { return a; } final T[] result=(T[])java.lang.reflect.Array.newInstance(a.getClass().getComponentType(),alen + blen); System.arra...
merge array
public static int countGsmSeptets(char c,boolean throwsException) throws EncodeException { if (sCharsToGsmTables[0].get(c,-1) != -1) { return 1; } if (sCharsToShiftTables[0].get(c,-1) != -1) { return 2; } if (throwsException) { throw new EncodeException(c); } else { return 1; } }
Returns the count of 7-bit GSM alphabet characters needed to represent this character using the default 7 bit GSM alphabet.
public DescriptiveStatsAction(DataEditor editor){ super("Descriptive Statistics..."); this.dataEditor=editor; }
Constructs the <code>DescriptiveStatsAction</code> given the <code>DataEditor</code> that its attached to.
public StatisticsTypeImpl(String name,String description,StatisticDescriptor[] stats){ this(name,description,stats,false); }
Creates a new <code>StatisticsType</code> with the given name, description, and statistics.
public void init() throws ServletException { }
Initialization of the servlet. <br>
void append(DNSIncoming that){ if (this.isQuery() && this.isTruncated() && that.isQuery()) { this._questions.addAll(that.getQuestions()); this._answers.addAll(that.getAnswers()); this._authoritativeAnswers.addAll(that.getAuthorities()); this._additionals.addAll(that.getAdditionals()); } else { ...
Appends answers to this Incoming.
private static boolean isInputExhausted(StreamTokenizer input) throws ParseError { try { if (input.nextToken() == StreamTokenizer.TT_EOF) { return true; } input.pushBack(); return false; } catch ( IOException e) { throw new ParseError(e.getMessage()); } }
Determines if the input is exhausted.
public boolean isVersion2(){ return !_compat; }
Returns true for OpenID 2 AssociationSessionType's, or false for OpenID 1.x types.
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.
public final String toString(){ return name; }
Returns the name of this subset.
public synchronized boolean start(BufferedImage typicalImage){ return start(typicalImage,DEFAULT_FRAME_RATE); }
Create a dialog box allowing the user to specify where to save the file, and in what format and frame rate (default = 10 frames per second), and set up the movie encoding process ready to go, using typicalImage as an example image (for size purposes). Return false if failed to start.
static public void dismissAll(FragmentActivity activity){ dismissDialog(activity,PROGRESS_LOADING); dismissDialog(activity,PROGRESS_DOWNLOAD); dismissDialog(activity,PROGRESS_DELETING); dismissDialog(activity,PROGRESS_SEARCHING); dismissDialog(activity,PROGRESS_SAVING); dismissDialog(activity,PROGRESS_OAUTH...
Dismiss all possible progress dialogs to stop them being recreated
public CopyRequest(final String requestUrl,final IOneDriveClient client,final List<Option> options,final String name,final ItemReference parentReference){ super(requestUrl,client,options,name,parentReference); }
The request for this Copy
private FGBasis generateBasis(){ int N=params.N; int q=params.q; int d=params.d; int d1=params.d1; int d2=params.d2; int d3=params.d3; int basisType=params.basisType; Polynomial f; IntegerPolynomial fInt; Polynomial g; IntegerPolynomial gInt; IntegerPolynomial fq; Resultant rf; Resultant rg;...
Creates a NTRUSigner basis consisting of polynomials <code>f, g, F, G, h</code>.<br/> If <code>KeyGenAlg=FLOAT</code>, the basis may not be valid and this method must be rerun if that is the case.<br/>
public boolean isEmpty(){ return size == 0; }
Tests if this buffer has no elements.
public void addGumball(Gumball gumball){ gumball.mGumballColorId=getRandomGumballId(); mWorld.addGumball(gumball.mXInitPos,gumball.mYInitPos,gumball,GUMBALL_DENSITY,GUMBALL_RADIUS,GUMBALL_BOUNCE,GUMBALL_FRICTION,BodyType.DYNAMIC); }
Adds a gumball for drawing.
public static byte[] encode(byte[] data){ return encode(data,0,data.length); }
encode the input data producing a base 64 encoded byte array.
public final void testSchema(){ assertFalse(schema.isElementAllowed(el("script"))); assertFalse(schema.isElementAllowed(el("style"))); assertFalse(schema.isElementAllowed(el("xmp"))); assertFalse(schema.isElementAllowed(el("listing"))); assertFalse(schema.isElementAllowed(el("frame"))); assertFalse(schema.i...
blacklist the whitelist.
private static boolean areMethodArgsCompatible(Class[] argTypes,Object[] args){ for (int i=0; i < args.length; i++) { Object arg=args[i]; Class argType=wrap(argTypes[i]); if (arg != null && !argType.isAssignableFrom(arg.getClass())) return false; } return true; }
Determines whether specified method arguments are compatible with given method parameter definitions.
public RowSorterEvent(RowSorter source,Type type,int[] previousRowIndexToModel){ super(source); if (type == null) { throw new IllegalArgumentException("type must be non-null"); } this.type=type; this.oldViewToModel=previousRowIndexToModel; }
Creates a <code>RowSorterEvent</code>.
private void sendEvent(String eventType,@Nullable WritableMap params){ mContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit(eventType,params); }
Delivers an event to the JS module.
public void test_getInnerCause03_reject_otherType(){ Throwable cause=new RuntimeException(); Throwable t=new Exception(cause); assertNull(getInnerCause(t,IOException.class)); }
Does not find an inner cause that is neither the specified type nor a subtype of the specified type.
public NoSuchMethodException(){ super(); }
Constructs a <code>NoSuchMethodException</code> without a detail message.
public void write(BinaryRawWriter writer){ writer.writeString(schemaName); writer.writeString(tableName); writer.writeString(columnName); byte typeId=BinaryUtils.typeByClass(dataType); writer.writeByte(typeId); }
Write in a binary format.
public static Validator<CharSequence> iri(@NonNull final CharSequence errorMessage){ return new IRIValidator(errorMessage); }
Creates and returns a validator, which allows to validate texts to ensure, that they represent valid IRIs. IRIs are internationalized URLs according to RFC 3987, which are for example used as internet addresses. Empty texts are also accepted.
@Override public boolean input(Instance instance){ Instance newInstance=null; if (getInputFormat() == null) { throw new IllegalStateException("No input instance format defined"); } if (m_NewBatch) { resetQueue(); m_NewBatch=false; } if (m_encodeMissingAsZero && !m_insertDummyNominalFirstValue) {...
Input an instance for filtering. Ordinarily the instance is processed and made available for output immediately. Some filters require all instances be read before producing output.
public static <T>List<List<T>> overlap(List<List<T>> lists,int before,int after){ if (before < 0) { throw new IllegalArgumentException("Value of before cannot be negative"); } if (after < 0) { throw new IllegalArgumentException("Value of after cannot be negative"); } ListIterator<List<T>> iter=lists.l...
Introduces overlap into a series of lists.
private boolean isBST(Node x,Key min,Key max){ if (x == null) return true; if (min != null && x.key.compareTo(min) <= 0) return false; if (max != null && x.key.compareTo(max) >= 0) return false; return isBST(x.left,min,x.key) && isBST(x.right,x.key,max); }
Checks if the tree rooted at x is a BST with all keys strictly between min and max (if min or max is null, treat as empty constraint) Credit: Bob Dondero's elegant solution
public void createDecoration(Image decorationImage){ contentProposalDecoration=new ControlDecoration(this,SWT.TOP | SWT.LEFT); contentProposalDecoration.setImage(decorationImage); contentProposalDecoration.hide(); }
Creates a decoration with the given image for this text. Note that the decoration is only displayed in focus.
public static <T,K>Consumer<Partition<T,K,List<T>>> evictAllAndScheduleEvictWithProcess(long time,TimeUnit unit){ long timeMs=TimeUnit.MILLISECONDS.convert(time,unit); return null; }
An eviction policy which processes the window, evicts all tuples, and schedules the next eviction after the appropriate interval.
public static SynchronizedCounter newSynchronizedCounter(){ return factory.newSynchronizedCounter(); }
Create a new SynchronizedCounter instance using the appropriate VM-specific concrete SynchronizedCounter sub-class.
public static void presignedPostPolicy_test() throws Exception { println("Test: presignedPostPolicy(PostPolicy policy)"); String fileName=createFile(3 * MB); PostPolicy policy=new PostPolicy(bucketName,fileName,DateTime.now().plusDays(7)); policy.setContentRange(1 * MB,4 * MB); Map<String,String> formData=cli...
Test: presignedPostPolicy(PostPolicy policy).
protected void findEigenVectors(double[][] imat,double[][] evs,double[] lambda){ final int size=imat.length; Random rnd=random.getSingleThreadedRandom(); double[] tmp=new double[size]; FiniteProgress prog=LOG.isVerbose() ? new FiniteProgress("Learning projections",tdim,LOG) : null; for (int d=0; d < tdim; ) {...
Find the first eigenvectors and eigenvalues using power iterations.
private void linearScan(Relation<? extends O> relation,DBIDIter iter,O obj,double range,ModifiableDoubleDBIDList result){ while (iter.valid()) { final double distance=rawdist.distance(obj,relation.get(iter)); if (distance <= range) { result.add(distance,iter); } iter.advance(); } }
Main loop for linear scan,
protected void sendMomentaryFunctionGroup5(){ if (tc.getCommandStation().getCommandStationSoftwareVersionBCD() < 0x36) { log.info("Functions F13-F28 unavailable in CS software version " + tc.getCommandStation().getCommandStationSoftwareVersion()); return; } if (tc.getCommandStation().getCommandStationType...
Send the XpressNet message to set the momentary state of functions F21, F22, F23, F24 F25 F26 F27 F28
public boolean isSet(_Fields field){ if (field == null) { throw new IllegalArgumentException(); } switch (field) { case NODE_ID: return isSetNodeId(); case VERSION: return isSetVersion(); } throw new IllegalStateException(); }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
SavedState(Parcelable superState){ super(superState); }
Called by onSaveInstanceState.
public void testGetInstanceStringProvider02() throws NoSuchAlgorithmException, IllegalArgumentException { if (!DEFSupported) { fail(NotSupportMsg); return; } Provider provider=null; for (int i=0; i < invalidValues.length; i++) { try { KeyAgreement.getInstance(invalidValues[i],provider); ...
Test for <code> getInstance(String algorithm, Provider provider)</code> method Assertions: throws IllegalArgumentException when provider is null
public BaseItemRequest(String requestUrl,IOneDriveClient client,List<Option> options){ super(requestUrl,client,options,Item.class); }
The request for the Item
@Override public void parseEndElement(){ }
<p>Parse the end element</p>
public void start(){ mTargetWrapperView.prepareTransition(mToShow); mContainer.prepareTransition(mToShow); if (mToShow == null) { continueAnimation(); } else { mTargetWrapperView.getViewTreeObserver().addOnGlobalLayoutListener(this); } }
Start the animation.
public static byte[] encodeBase64(final byte[] binaryData){ return encodeBase64(binaryData,false); }
Encodes binary data using the base64 algorithm but does not chunk the output.
private void split(){ int subWidth=(int)(bounds.width() / 2); int subHeight=(int)(bounds.height() / 2); int x=(int)bounds.left; int y=(int)bounds.top; nodes[0]=new QuadTree(level + 1,new RectF(x + subWidth,y,subWidth,subHeight)); nodes[1]=new QuadTree(level + 1,new RectF(x,y,subWidth,subHeight)); nodes[2]...
split nodes
private static void initializeSettings(Settings.Builder output,Settings input,boolean loadDefaults){ output.put(input); if (useSystemProperties(input)) { if (loadDefaults) { for ( String prefix : PROPERTY_DEFAULTS_PREFIXES) { output.putProperties(prefix,System.getProperties()); } } ...
Initializes the builder with the given input settings, and loads system properties settings if allowed. If loadDefaults is true, system property default settings are loaded.
public Message first(){ return history.get(0); }
Gets the first message sent by the other member
public void testIsCheckSumValid(){ CoreIdRfidProtocol instance=new CoreIdRfidProtocol(); assertEquals(true,instance.isCheckSumValid(msgStandalone)); assertEquals(false,instance.isCheckSumValid(msgBadChkSumStandalone)); instance=new CoreIdRfidProtocol('A','H',1); assertEquals(true,instance.isCheckSumValid(msgC...
Test of isCheckSumValid method, of class CoreIdRfidProtocol.
private void flush(Tuple tickTuple){ LOG.info(String.format("Flushing profile: profile=%s, entity=%s",measurement.getProfileName(),measurement.getEntity())); Object result; try { String resultExpr=profileConfig.getResult(); result=executor.execute(resultExpr,new JSONObject(),Object.class); } catch ( P...
Flush the Profile. Executed on a fixed time period when a tick tuple is received. Completes and emits the ProfileMeasurement. Clears all state in preparation for the next window period.
public static void notSupported(){ throw new DOMException(DOMException.NOT_SUPPORTED_ERR,"Not supported yet"); }
Called when a method has not been implemented yet
private long cancelWaiter(WNode node,WNode group,boolean interrupted){ if (node != null && group != null) { Thread w; node.status=CANCELLED; for (WNode p=group, q; (q=p.cowait) != null; ) { if (q.status == CANCELLED) { U.compareAndSwapObject(p,WCOWAIT,q,q.cowait); p=group; } e...
If node non-null, forces cancel status and unsplices it from queue if possible and wakes up any cowaiters (of the node, or group, as applicable), and in any case helps release current first waiter if lock is free. (Calling with null arguments serves as a conditional form of release, which is not currently needed but ma...
public SnackbarBuilder messageTextColor(@ColorInt int messageTextColor){ this.messageTextColor=messageTextColor; return this; }
Set the colour to display the message on the Snackbar.
public void testRecognizeSymmetricNat() throws Exception { Response testIResponse1=MessageFactory.create3489BindingResponse(mappedClientAddress,responseServerAddress,responseServerAddress); Response testIResponse2=null; Response testIResponse3=MessageFactory.create3489BindingResponse(mappedClientAddressPort2,resp...
Performs a test where no responces are given the stun client so that it concludes it is behind a Symmetric NAT.
public static double signedArea(Coordinate[] ring){ if (ring.length < 3) return 0.0; double sum=0.0; double x0=ring[0].x; for (int i=1; i < ring.length - 1; i++) { double x=ring[i].x - x0; double y1=ring[i + 1].y; double y2=ring[i - 1].y; sum+=x * (y2 - y1); } return sum / 2.0; }
Computes the signed area for a ring. The signed area is positive if the ring is oriented CW, negative if the ring is oriented CCW, and zero if the ring is degenerate or flat.
public Object runSafely(Catbert.FastStack stack) throws Exception { String role=getString(stack); Show s=getShow(stack); return (s == null) ? Pooler.EMPTY_STRING_ARRAY : s.getPeopleCharacterList(Show.getRoleForString(role)); }
Gets the people in the specified Show in the specified Role. Returned as a String array. Each string will also indicate the character they play if known; using the localized format "Actor as Character".