code
stringlengths
10
174k
nl
stringlengths
3
129k
public static void removeAllBeansFromContainer(JComponent container,Integer... tab){ int index=0; if (tab.length > 0) { index=tab[0].intValue(); } Vector<Object> components=null; if (TABBED_COMPONENTS.size() > 0 && index < TABBED_COMPONENTS.size()) { components=TABBED_COMPONENTS.get(index); } if (container != null) { if (components != null) { for (int i=0; i < components.size(); i++) { Object tempInstance=components.elementAt(i); Object tempBean=((BeanInstance)tempInstance).getBean(); if (Beans.isInstanceOf(tempBean,JComponent.class)) { container.remove((JComponent)tempBean); } } } container.revalidate(); } }
Removes all beans from containing component
public StringIndexOutOfBoundsException(String s,int offset,int count){ this(s.length(),offset,count); }
Used internally for consistent high-quality error reporting.
public String describeReferenceTo(JavaThing target,Snapshot ss){ JavaThing[] flds=getFields(); for (int i=0; i < flds.length; i++) { if (flds[i] == target) { JavaField f=getClazz().getFieldForInstance(i); return "field " + f.getName(); } } return super.describeReferenceTo(target,ss); }
Describe the reference that this thing has to target. This will only be called if target is in the array returned by getChildrenForRootset.
private void drawDivider(Canvas canvas,View view,Divider divider,Position position){ EnumSet<Direction> directions=Direction.getSouthEastCorner(); if (position.getColumn() == 0) { directions.add(Direction.SOUTH_WEST); directions.add(Direction.WEST); } if (position.getRow() == 0) { directions.add(Direction.NORTH); directions.add(Direction.NORTH_EAST); } if (position.getColumn() == 0 && position.getRow() == 0) { directions.add(Direction.NORTH_WEST); } divider.draw(canvas,view,directions); }
Draw the provided divider. Each divider is responsible for drawing some of his surroundings. Drawing priorities follows a top-to-bottom and left-to-right rule, this means that the north-west item will draw all his dividers all the other north cells will draw all but west separators, and west cells will draw all but north separators. The rest of the cells will draw only east, south-east and south dividers: ___ ___ ___ | | | | |___| ___| ___| | | | | |___| ___| ___| | | | | |___| ___| ___|
public void reset(ActionMapping mapping,HttpServletRequest request){ op=""; subjectAreaId=null; courseOfferingId=null; instrOfferingId=null; courseName=""; title=""; scheduleBookNote=""; demandCourseOfferingId=null; consent=null; creditFormat=null; creditType=null; creditUnitType=null; units=null; maxUnits=null; fractionalIncrementsAllowed=new Boolean(false); creditText=""; courseNbr=""; ioNotOffered=null; catalogLinkLabel=null; catalogLinkLocation=null; instructors=DynamicList.getInstance(new ArrayList(),factory); byReservationOnly=false; wkEnroll=null; wkChange=null; wkDrop=null; wkEnrollDefault=null; wkChangeDefault=null; wkDropDefault=null; weekStartDayOfWeek=null; courseTypeId=null; add=false; externalId=null; }
Method reset
@Override public StringBuilder format(final StringBuilder sb,final long w){ final int initPosition=sb.length(); sb.append(mLocalFormat.format(w)); final int currLength=sb.length() - initPosition; final int pad=mLength - currLength; if (pad > 0) { sb.append(mPadding,0,pad); } return sb; }
Format long into StringBuilder
public void reverse(){ reverse(0,_pos); }
Reverse the order of the elements in the list.
public static void assertRegex(String regex,String string){ Pattern p=Pattern.compile(regex); assertTrue(string,p.matcher(string).matches()); }
Asserts that a string matches a regular expression.
public void sendSerialMessage(SerialMessage m,SerialListener reply){ sendMessage(m,reply); }
Forward a preformatted message to the actual interface.
private void allocateIndex(){ if (index != null) throw new IllegalStateException(); if (!open.get()) { throw new IllegalStateException(); } store=new MemStore(new MemoryManager(DirectBufferPool.INSTANCE)); if (isBTree) { index=BTree.create(store,metadata); } else { index=HTree.create(store,(HTreeIndexMetadata)metadata); } }
Create the persistence capable index.
FormatSpecifierParser(String format){ this.format=format; this.length=format.length(); }
Constructs a new parser for the given format string.
public static PrivateKey mutate(final PrivateKey key){ return new PrivateKey(key.getRaw().add(BigInteger.ONE)); }
Mutates key into a slightly different key.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:02:35.748 -0500",hash_original_method="8F28A3C0281B6F16DECF00092A03388F",hash_generated_method="E6B3AE3BEB63D05981CAAF6DB37BEC46") private boolean isFreshnessLifetimeHeuristic(){ return maxAgeSeconds == -1 && expires == null; }
Returns true if computeFreshnessLifetime used a heuristic. If we used a heuristic to serve a cached response older than 24 hours, we are required to attach a warning.
public void dispose(IoSession session) throws Exception { }
Override this method to dispose all resources related with this decoder. The default implementation does nothing.
public static boolean nameEquals(char[][] typeName,String string){ StringBuilder sb=new StringBuilder(); boolean first=true; for ( char[] elem : typeName) { if (first) first=false; else sb.append('.'); sb.append(elem); } return string.contentEquals(sb); }
Checks if an eclipse-style array-of-array-of-characters to represent a fully qualified name ('foo.bar.baz'), matches a plain string containing the same fully qualified name with dots in the string.
public void cloneSprite() throws IOException { print("cloneSprite",null); }
Description of the Method
public void dropActionChanged(DragSourceDragEvent dsde){ Debug.message("dndlistener","dropActionChanged(source)"); int action=dsde.getDropAction(); Debug.message("dndlistener","action=" + action); if (action == default_action) { dsde.getDragSourceContext().setCursor(getCursor(DragSource.DefaultMoveDrop)); } else { dsde.getDragSourceContext().setCursor(getCursor(DragSource.DefaultMoveNoDrop)); } }
Called when the user has modified the drop gesture. This method is invoked when the state of the input device(s) that the user is interacting with changes. Such devices are typically the mouse buttons or keyboard modifiers that the user is interacting with. <P>
public boolean validate(Node nodeSignature) throws DigitalSignatureValidationException { DOMValidateContext validationContext=new DOMValidateContext(factory.newKeySelector(nodeSignature),nodeSignature); return validate(validationContext); }
Steps: <ul> <li>create validation context <li>unmarshal the XMLSignature <li>validate </ul>
public void opc_ifnull(Label l){ short instrBCI=getLength(); emitByte(opc_ifnull); l.add(this,instrBCI,getLength(),getStack() - 1); emitShort((short)-1); decStack(); }
Control flow with forward-reference BCI. Stack assumes straight control flow.
protected final void FP_MOV_OP_MOV(Instruction s,Operator op,Operand result,Operand val1,Operand val2){ if (VM.BuildForSSE2) { UNREACHABLE(); } else { EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,D(getFPR(0)),val1))); EMIT(MIR_BinaryAcc.mutate(s,op,D(getFPR(0)),val2)); EMIT(CPOS(s,MIR_Move.create(IA32_FMOV,result,D(getFPR(0))))); } }
Expansion of FP_ADD_ACC, FP_MUL_ACC, FP_SUB_ACC, and FP_DIV_ACC. Moves first value into fp0, accumulates second value into fp0 using op, moves fp0 into result.
public static int flip(int type,int data,FlipDirection direction){ int flipX=0; int flipY=0; int flipZ=0; switch (direction) { case NORTH_SOUTH: flipZ=1; break; case WEST_EAST: flipX=1; break; case UP_DOWN: flipY=1; break; } switch (type) { case BlockID.TORCH: case BlockID.REDSTONE_TORCH_OFF: case BlockID.REDSTONE_TORCH_ON: if (data < 1 || data > 4) break; switch (data) { case 1: return data + flipX; case 2: return data - flipX; case 3: return data + flipZ; case 4: return data - flipZ; } break; case BlockID.STONE_BUTTON: case BlockID.WOODEN_BUTTON: { switch (data & ~0x8) { case 1: return data + flipX; case 2: return data - flipX; case 3: return data + flipZ; case 4: return data - flipZ; case 0: case 5: return data ^ (flipY * 5); } break; } case BlockID.LEVER: switch (data & ~0x8) { case 1: return data + flipX; case 2: return data - flipX; case 3: return data + flipZ; case 4: return data - flipZ; case 5: case 7: return data ^ flipY << 1; case 6: case 0: return data ^ flipY * 6; } break; case BlockID.MINECART_TRACKS: switch (data) { case 6: return data + flipX + flipZ * 3; case 7: return data - flipX + flipZ; case 8: return data + flipX - flipZ; case 9: return data - flipX - flipZ * 3; } case BlockID.POWERED_RAIL: case BlockID.DETECTOR_RAIL: case BlockID.ACTIVATOR_RAIL: switch (data & 0x7) { case 0: case 1: return data; case 2: case 3: return data ^ flipX; case 4: case 5: return data ^ flipZ; } break; case BlockID.STEP: case BlockID.WOODEN_STEP: return data ^ (flipY << 3); case 203: case BlockID.RED_SANDSTONE_STAIRS: case BlockID.OAK_WOOD_STAIRS: case BlockID.COBBLESTONE_STAIRS: case BlockID.BRICK_STAIRS: case BlockID.STONE_BRICK_STAIRS: case BlockID.NETHER_BRICK_STAIRS: case BlockID.SANDSTONE_STAIRS: case BlockID.SPRUCE_WOOD_STAIRS: case BlockID.BIRCH_WOOD_STAIRS: case BlockID.JUNGLE_WOOD_STAIRS: case BlockID.QUARTZ_STAIRS: case BlockID.ACACIA_STAIRS: case BlockID.DARK_OAK_STAIRS: data^=flipY << 2; switch (data) { case 0: case 1: case 4: case 5: return data ^ flipX; case 2: case 3: case 6: case 7: return data ^ flipZ; } break; case BlockID.WOODEN_DOOR: case BlockID.IRON_DOOR: if ((data & 0x8) != 0) { break; } switch (data & 0x3) { case 0: return data + flipX + flipZ * 3; case 1: return data - flipX + flipZ; case 2: return data + flipX - flipZ; case 3: return data - flipX - flipZ * 3; } break; case BlockID.SIGN_POST: switch (direction) { case NORTH_SOUTH: return (16 - data) & 0xf; case WEST_EAST: return (8 - data) & 0xf; default : } break; case BlockID.LADDER: case BlockID.WALL_SIGN: case BlockID.CHEST: case BlockID.FURNACE: case BlockID.BURNING_FURNACE: case BlockID.ENDER_CHEST: case BlockID.TRAPPED_CHEST: case BlockID.HOPPER: int extra=data & 0x8; int withoutFlags=data & ~0x8; switch (withoutFlags) { case 2: case 3: return (data ^ flipZ) | extra; case 4: case 5: return (data ^ flipX) | extra; } break; case 198: case BlockID.DROPPER: case BlockID.DISPENSER: int dispPower=data & 0x8; switch (data & ~0x8) { case 2: case 3: return (data ^ flipZ) | dispPower; case 4: case 5: return (data ^ flipX) | dispPower; case 0: case 1: return (data ^ flipY) | dispPower; } break; case BlockID.PUMPKIN: case BlockID.JACKOLANTERN: if (data > 3) break; case BlockID.REDSTONE_REPEATER_OFF: case BlockID.REDSTONE_REPEATER_ON: case BlockID.COMPARATOR_OFF: case BlockID.COMPARATOR_ON: case BlockID.COCOA_PLANT: case BlockID.TRIPWIRE_HOOK: switch (data & 0x3) { case 0: case 2: return data ^ (flipZ << 1); case 1: case 3: return data ^ (flipX << 1); } break; case BlockID.TRAP_DOOR: case BlockID.IRON_TRAP_DOOR: switch (data & 0x3) { case 0: case 1: return data ^ flipZ; case 2: case 3: return data ^ flipX; } break; case BlockID.PISTON_BASE: case BlockID.PISTON_STICKY_BASE: case BlockID.PISTON_EXTENSION: switch (data & ~0x8) { case 0: case 1: return data ^ flipY; case 2: case 3: return data ^ flipZ; case 4: case 5: return data ^ flipX; } break; case BlockID.RED_MUSHROOM_CAP: case BlockID.BROWN_MUSHROOM_CAP: switch (data) { case 1: case 4: case 7: data+=flipX * 2; break; case 3: case 6: case 9: data-=flipX * 2; break; } switch (data) { case 1: case 2: case 3: return data + flipZ * 6; case 7: case 8: case 9: return data - flipZ * 6; } break; case BlockID.VINE: final int bit1, bit2; switch (direction) { case NORTH_SOUTH: bit1=0x2; bit2=0x8; break; case WEST_EAST: bit1=0x1; bit2=0x4; break; default : return data; } int newData=data & ~(bit1 | bit2); if ((data & bit1) != 0) newData|=bit2; if ((data & bit2) != 0) newData|=bit1; return newData; case BlockID.FENCE_GATE: switch (data & 0x3) { case 0: case 2: return data ^ flipZ << 1; case 1: case 3: return data ^ flipX << 1; } break; case BlockID.BED: switch (data & 0x3) { case 0: case 2: return data ^ flipZ << 1; case 1: case 3: return data ^ flipX << 1; } break; case BlockID.HEAD: switch (data) { case 2: case 3: return data ^ flipZ; case 4: case 5: return data ^ flipX; } break; case BlockID.ANVIL: switch (data & 0x3) { case 0: case 2: return data ^ flipZ << 1; case 1: case 3: return data ^ flipX << 1; } break; } return data; }
Flip a block's data value.
public static double angle(double[] v1,double[] v2){ final int mindim=(v1.length >= v2.length) ? v1.length : v2.length; double s=0, e1=0, e2=0; for (int k=0; k < mindim; k++) { final double r1=v1[k]; final double r2=v2[k]; s+=r1 * r2; e1+=r1 * r1; e2+=r2 * r2; } for (int k=mindim; k < v1.length; k++) { final double r1=v1[k]; e1+=r1 * r1; } for (int k=mindim; k < v2.length; k++) { final double r2=v2[k]; e2+=r2 * r2; } double a=Math.sqrt((s / e1) * (s / e2)); return (a < 1.) ? a : 1.; }
Compute the angle between two vectors.
public void add(EventBean[] events){ if (events == null) { return; } for (int i=0; i < events.length; i++) { add(events[i]); } }
Add events to the buffer.
public StatMonitorHandler(){ }
Constructs a new StatMonitorHandler instance
@Description(summary="Build the h2console.war file.") public void warConsole(){ jar(); copy("temp/WEB-INF",files("src/tools/WEB-INF/web.xml"),"src/tools/WEB-INF"); copy("temp",files("src/tools/WEB-INF/console.html"),"src/tools/WEB-INF"); copy("temp/WEB-INF/lib",files("bin/h2" + getJarSuffix()),"bin"); FileList files=files("temp").exclude("temp/org*").exclude("temp/META-INF*"); files.exclude("*.DS_Store"); jar("bin/h2console.war",files,"temp"); }
Build the h2console.war file.
public MemoryExampleTable(List<Attribute> attributes,DataRowFactory factory,int size){ this(attributes); dataList=new ArrayList<DataRow>(size); for (int i=0; i < size; i++) { DataRow dataRow=factory.create(attributes.size()); for ( Attribute attribute : attributes) { dataRow.set(attribute,Double.NaN); } dataList.add(dataRow); } }
Creates a new instance of MemoryExampleTable.
public void destroyDialog(final Class<?> dialogController){ dialogControllers.get(dialogController).destroyDialog(); }
Forces destruction of the selected dialog (if an instance is actually kept). Proper UI behavior is ensured only if dialog is not currently shown on the stage.
public Object[] toArray(Object[] a){ if (a.length < size) { a=(Object[])java.lang.reflect.Array.newInstance(a.getClass().getComponentType(),size); } int i=0; for (Entry e=header.next; e != header; e=e.next) { a[i++]=e.element; } if (a.length > size) { a[size]=null; } return a; }
Returns an array containing all of the elements in this list in the correct order; the runtime type of the returned array is that of the specified array. If the list fits in the specified array, it is returned therein. Otherwise, a new array is allocated with the runtime type of the specified array and the size of this list.<p> If the list fits in the specified array with room to spare (i.e., the array has more elements than the list), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the list <i>only</i> if the caller knows that the list does not contain any null elements.
public static byte[] join(byte[]... bufs){ int size=0; for ( byte[] buf : bufs) { size+=buf.length; } byte[] res=new byte[size]; int position=0; for ( byte[] buf : bufs) { arrayCopy(buf,0,res,position,buf.length); position+=buf.length; } return res; }
Join byte arrays into single one.
public boolean zip(File[] src,File dest){ return false; }
Implement in your project, bundle files into a zip file.
public Vector2 mul(Vector2 v){ float x=vals[POS_X] + vals[COS] * v.x + -vals[SIN] * v.y; float y=vals[POS_Y] + vals[SIN] * v.x + vals[COS] * v.y; v.x=x; v.y=y; return v; }
Transforms the given vector by this transform
private void recreateDirectoryIfVersionChanges(){ boolean recreateBase=false; if (!mRootDirectory.exists()) { recreateBase=true; } else if (!mVersionDirectory.exists()) { recreateBase=true; FileTree.deleteRecursively(mRootDirectory); } if (recreateBase) { try { FileUtils.mkdirs(mVersionDirectory); } catch ( FileUtils.CreateDirectoryException e) { mCacheErrorLogger.logError(CacheErrorLogger.CacheErrorCategory.WRITE_CREATE_DIR,TAG,"version directory could not be created: " + mVersionDirectory,null); } } }
Checks if we have to recreate rootDirectory. This is needed because old versions of this storage created too much different files in the same dir, and Samsung's RFS has a bug that after the 13.000th creation fails. So if cache is not already in expected version let's destroy everything (if not in expected version... there's nothing to reuse here anyway).
public static void parametersToAttributes(HttpServletRequest request){ java.util.Enumeration<String> e=UtilGenerics.cast(request.getParameterNames()); while (e.hasMoreElements()) { String name=e.nextElement(); request.setAttribute(name,request.getParameter(name)); } }
Put request parameters in request object as attributes.
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:09.171 -0500",hash_original_method="35E0733B1286860BF21842013F8FFA5F",hash_generated_method="74ED8BFECD329202BD9A7991EB86B847") private String readName() throws IOException, XmlPullParserException { if (position >= limit && !fillBuffer(1)) { checkRelaxed("name expected"); return ""; } int start=position; StringBuilder result=null; char c=buffer[position]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || c == '_' || c == ':' || c >= '\u00c0' || relaxed) { position++; } else { checkRelaxed("name expected"); return ""; } while (true) { if (position >= limit) { if (result == null) { result=new StringBuilder(); } result.append(buffer,start,position - start); if (!fillBuffer(1)) { return result.toString(); } start=position; } c=buffer[position]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9')|| c == '_' || c == '-' || c == ':' || c == '.' || c >= '\u00b7') { position++; continue; } if (result == null) { return stringPool.get(buffer,start,position - start); } else { result.append(buffer,start,position - start); return result.toString(); } } }
Returns an element or attribute name. This is always non-empty for non-relaxed parsers.
public GPUImageDilationFilter(int radius){ this(getVertexShader(radius),getFragmentShader(radius)); }
Acceptable values for dilationRadius, which sets the distance in pixels to sample out from the center, are 1, 2, 3, and 4.
private void handleResponse(int response,ResponseData rawData){ mPolicy.processServerResponse(response,rawData); if (mPolicy.allowAccess()) { mCallback.allow(response); } else { mCallback.dontAllow(response); } }
Confers with policy and calls appropriate callback method.
public org.apache.nutch.storage.WebPage.Builder clearMetadata(){ metadata=null; fieldSetFlags()[22]=false; return this; }
Clears the value of the 'metadata' field
public static void clearFlow(){ sFlowMap.clear(); }
Clear flow map.
public HGPersistentHandle store(byte[] data){ HGPersistentHandle handle=config.getHandleFactory().makeHandle(); store(handle,data); return handle; }
<p>Write raw binary data to the store. A new persistent handle is created to refer to the data.</p>
public FightBattleDetails waitForBattleSelection(){ return m_battlePanel.waitForBattleSelection(); }
Blocks until the user selects a battle to fight.
@Override public void g(float sideMot,float forMot){ if (!CustomEntities.customEntities.contains(this)) { super.g(sideMot,forMot); return; } if (getSize() != 3) setSize(3); if (this.passenger != null && this.passenger instanceof EntityHuman && CustomEntities.customEntities.contains(this)) { this.lastYaw=this.yaw=this.passenger.yaw; this.pitch=this.passenger.pitch * 0.5F; this.setYawPitch(this.yaw,this.pitch); this.aI=this.aG=this.yaw; sideMot=((EntityLiving)this.passenger).aZ * 0.5F; forMot=((EntityLiving)this.passenger).ba; Field jump=null; try { jump=EntityLiving.class.getDeclaredField("aY"); } catch ( NoSuchFieldException|SecurityException e1) { e1.printStackTrace(); } jump.setAccessible(true); if (jump != null && BlockUtils.isOnGround(this.getBukkitEntity())) { try { if (jump.getBoolean(this.passenger)) { double jumpHeight=0.3D; this.motY=jumpHeight; } } catch ( IllegalAccessException e) { e.printStackTrace(); } } this.S=1.0F; this.aK=this.yaw; if (!this.world.isClientSide) { this.k(0.2f); if (bM()) { if (V()) { double d0=locY; float f3=0.8F; float f4=0.02F; float f2=EnchantmentManager.b(this); if (f2 > 3.0F) { f2=3.0F; } if (f2 > 0.0F) { f3+=(0.5460001F - f3) * f2 / 3.0F; f4+=(bI() * 1.0F - f4) * f2 / 3.0F; } a(sideMot,forMot,f4); move(motX,motY,motZ); motX*=f3; motY*=0.800000011920929D; motZ*=f3; motY-=0.02D; if ((positionChanged) && (c(motX,motY + 0.6000000238418579D - locY + d0,motZ))) motY=0.300000011920929D; } else if (ab()) { double d0=locY; a(sideMot,forMot,0.02F); move(motX,motY,motZ); motX*=0.5D; motY*=0.5D; motZ*=0.5D; motY-=0.02D; if ((positionChanged) && (c(motX,motY + 0.6000000238418579D - locY + d0,motZ))) motY=0.300000011920929D; } else { float f5=world.getType(new BlockPosition(MathHelper.floor(locX),MathHelper.floor(getBoundingBox().b) - 1,MathHelper.floor(locZ))).getBlock().frictionFactor * 0.91F; float f6=0.1627714F / (f5 * f5 * f5); float f3=bI() * f6; a(sideMot,forMot,f3); f5=world.getType(new BlockPosition(MathHelper.floor(locX),MathHelper.floor(getBoundingBox().b) - 1,MathHelper.floor(locZ))).getBlock().frictionFactor * 0.91F; if (k_()) { float f4=0.15F; motX=MathHelper.a(motX,-f4,f4); motZ=MathHelper.a(motZ,-f4,f4); fallDistance=0.0F; if (motY < -0.15D) { motY=-0.15D; } if (motY < 0.0D) { motY=0.0D; } } move(motX,motY,motZ); if ((positionChanged) && (k_())) { motY=0.2D; } if ((world.isClientSide) && ((!world.isLoaded(new BlockPosition((int)locX,0,(int)locZ))) || (!world.getChunkAtWorldCoords(new BlockPosition((int)locX,0,(int)locZ)).o()))) { if (locY > 0.0D) motY=-0.1D; else motY=0.0D; } else { motY+=0D; } motY*=0.9800000190734863D; motX*=f5; motZ*=f5; } } ay=az; double d0=locX - lastX; double d1=locZ - lastZ; float f2=MathHelper.sqrt(d0 * d0 + d1 * d1) * 4.0F; if (f2 > 1.0F) { f2=1.0F; } az+=(f2 - az) * 0.4F; aA+=az; super.g(sideMot,forMot); } this.ay=this.az; double d0=this.locX - this.lastX; double d1=this.locZ - this.lastZ; float f4=MathHelper.sqrt(d0 * d0 + d1 * d1) * 4.0F; if (f4 > 1.0F) { f4=1.0F; } this.az+=(f4 - this.az) * 0.4F; this.aA+=this.az; } else { this.S=0.5F; this.aK=0.02F; super.g(sideMot,forMot); } }
WASD Control.
private long startWait(){ return System.nanoTime(); }
Initialize the timeout timer
public ColladaVisualScene(String ns){ super(ns); }
Construct an instance.
private void put(final Item i){ if (index + typeCount > threshold) { int ll=items.length; int nl=ll * 2 + 1; Item[] newItems=new Item[nl]; for (int l=ll - 1; l >= 0; --l) { Item j=items[l]; while (j != null) { int index=j.hashCode % newItems.length; Item k=j.next; j.next=newItems[index]; newItems[index]=j; j=k; } } items=newItems; threshold=(int)(nl * 0.75); } int index=i.hashCode % items.length; i.next=items[index]; items[index]=i; }
Puts the given item in the constant pool's hash table. The hash table <i>must</i> not already contains this item.
public String toString(){ final String TAB=" "; StringBuffer retValue=new StringBuffer(); retValue.append("AdressOperator ( ").append("address = ").append(this.address).append(TAB).append(" )"); return retValue.toString(); }
Constructs a <code>String</code> with all attributes in name = value format.
public SimpleCompositeService(Iterable<CompositeServiceEntry<? super I,? extends O>> services){ super(services); }
Creates a new instance that is composed of the specified entries.
static void testIsSameFile(Path tmpdir) throws IOException { Path thisFile=tmpdir.resolve("thisFile"); Path thatFile=tmpdir.resolve("thatFile"); assertTrue(isSameFile(thisFile,thisFile)); try { isSameFile(thisFile,thatFile); throw new RuntimeException("IOException not thrown"); } catch ( IOException x) { } try { isSameFile(thatFile,thisFile); throw new RuntimeException("IOException not thrown"); } catch ( IOException x) { } createFile(thisFile); try { try { isSameFile(thisFile,thatFile); throw new RuntimeException("IOException not thrown"); } catch ( IOException x) { } try { isSameFile(thatFile,thisFile); throw new RuntimeException("IOException not thrown"); } catch ( IOException x) { } createFile(thatFile); try { assertTrue(!isSameFile(thisFile,thatFile)); assertTrue(!isSameFile(thatFile,thisFile)); } finally { delete(thatFile); } if (TestUtil.supportsLinks(tmpdir)) { createSymbolicLink(thatFile,thisFile); try { assertTrue(isSameFile(thisFile,thatFile)); assertTrue(isSameFile(thatFile,thisFile)); } finally { TestUtil.deleteUnchecked(thatFile); } } } finally { delete(thisFile); } try { isSameFile(thisFile,null); throw new RuntimeException("NullPointerException expected"); } catch ( NullPointerException ignore) { } try { isSameFile(null,thatFile); throw new RuntimeException("NullPointerException expected"); } catch ( NullPointerException ignore) { } }
Tests isSameFile
public boolean isShunned(DistributedMember m){ if (!shunnedMembers.containsKey(m)) { return false; } latestViewWriteLock.lock(); try { long shunTime=shunnedMembers.get(m).longValue(); long now=System.currentTimeMillis(); if (shunTime + SHUNNED_SUNSET * 1000 > now) { return true; } endShun(m); return false; } finally { latestViewWriteLock.unlock(); } }
Indicate whether the given member is in the zombie list (dead or dying)
@RequestMapping(method=RequestMethod.GET) public String redirectToAdvancedSearch(){ return "redirect:/search/advanced_search"; }
If the users decides to write "http://localhost:8080/search/" into the browser she should get redirected to the advanced search formular
public GPathResult parse(final String uri) throws IOException, SAXException { return parse(new InputSource(uri)); }
Parse the content of the specified URI into a GPathResult Object
public SelectItemsIterator(FacesContext ctx,UIComponent parent){ kids=parent.getChildren().listIterator(); this.ctx=ctx; }
<p>Construct an iterator instance for the specified parent component.</p>
public int read() throws IOException { if (_input == null) throw new IOException("Reader closed"); return (_index < _input.length()) ? _input.charAt(_index++) : -1; }
Reads a single character. This method does not block, <code>-1</code> is returned if the end of the character sequence input has been reached.
@Override public boolean isActive(){ return amIActive; }
Used by the Whitebox GUI to tell if this plugin is still running.
protected List refreshTicksHorizontal(Graphics2D g2,Rectangle2D dataArea,RectangleEdge edge){ List result=new java.util.ArrayList(); Font tickLabelFont=getTickLabelFont(); g2.setFont(tickLabelFont); if (isAutoTickUnitSelection()) { selectAutoTickUnit(g2,dataArea,edge); } TickUnit tu=getTickUnit(); double size=tu.getSize(); int count=calculateVisibleTickCount(); double lowestTickValue=calculateLowestVisibleTickValue(); if (count <= ValueAxis.MAXIMUM_TICK_COUNT) { int minorTickSpaces=getMinorTickCount(); if (minorTickSpaces <= 0) { minorTickSpaces=tu.getMinorTickCount(); } for (int minorTick=1; minorTick < minorTickSpaces; minorTick++) { double minorTickValue=lowestTickValue - size * minorTick / minorTickSpaces; if (getRange().contains(minorTickValue)) { result.add(new NumberTick(TickType.MINOR,minorTickValue,"",TextAnchor.TOP_CENTER,TextAnchor.CENTER,0.0)); } } for (int i=0; i < count; i++) { double currentTickValue=lowestTickValue + (i * size); String tickLabel; NumberFormat formatter=getNumberFormatOverride(); if (formatter != null) { tickLabel=formatter.format(currentTickValue); } else { tickLabel=getTickUnit().valueToString(currentTickValue); } TextAnchor anchor, rotationAnchor; double angle=0.0; if (isVerticalTickLabels()) { anchor=TextAnchor.CENTER_RIGHT; rotationAnchor=TextAnchor.CENTER_RIGHT; if (edge == RectangleEdge.TOP) { angle=Math.PI / 2.0; } else { angle=-Math.PI / 2.0; } } else { if (edge == RectangleEdge.TOP) { anchor=TextAnchor.BOTTOM_CENTER; rotationAnchor=TextAnchor.BOTTOM_CENTER; } else { anchor=TextAnchor.TOP_CENTER; rotationAnchor=TextAnchor.TOP_CENTER; } } Tick tick=new NumberTick(new Double(currentTickValue),tickLabel,anchor,rotationAnchor,angle); result.add(tick); double nextTickValue=lowestTickValue + ((i + 1) * size); for (int minorTick=1; minorTick < minorTickSpaces; minorTick++) { double minorTickValue=currentTickValue + (nextTickValue - currentTickValue) * minorTick / minorTickSpaces; if (getRange().contains(minorTickValue)) { result.add(new NumberTick(TickType.MINOR,minorTickValue,"",TextAnchor.TOP_CENTER,TextAnchor.CENTER,0.0)); } } } } return result; }
Calculates the positions of the tick labels for the axis, storing the results in the tick label list (ready for drawing).
public void testClearBitNegativeOutside1(){ byte aBytes[]={1,-128,56,100,-2,-76,89,45,91,3,-15,35,26}; int aSign=-1; int number=150; byte rBytes[]={-65,-1,-1,-1,-1,-1,-2,127,-57,-101,1,75,-90,-46,-92,-4,14,-36,-26}; BigInteger aNumber=new BigInteger(aSign,aBytes); BigInteger result=aNumber.clearBit(number); byte resBytes[]=new byte[rBytes.length]; resBytes=result.toByteArray(); for (int i=0; i < resBytes.length; i++) { assertTrue(resBytes[i] == rBytes[i]); } assertEquals("incorrect sign",-1,result.signum()); }
clearBit(int n) outside a negative number
public static boolean deleteFilesInFolder(Context context,@NonNull final File folder){ boolean totalSuccess=true; String[] children=folder.list(); if (children != null) { for ( String child : children) { File file=new File(folder,child); if (!file.isDirectory()) { boolean success=deleteFile(context,file); if (!success) { Log.w(TAG,"Failed to delete file" + child); totalSuccess=false; } } } } return totalSuccess; }
Delete all files in a folder.
public void removeListener(final IGraphBuilderManagerListener listener){ m_listeners.removeListener(listener); }
Removes a previously listening listener.
public static void validateCertificate(boolean production,X509Certificate certificate) throws CertificateException { if (certificate == null) throw new CertificateException("Null certificate"); certificate.checkValidity(); final Map<String,String> stringStringMap=CertificateUtils.splitCertificateSubject(certificate.getSubjectDN().getName()); final String cn=stringStringMap.get("CN"); if (!cn.toLowerCase().contains("push")) { throw new CertificateException("Not a push certificate - " + cn); } if (production && cn.toLowerCase().contains("apple development ios push services")) { throw new CertificateEnvironmentMismatchException("Invalid environment for this certificate"); } else if (!production && cn.toLowerCase().contains("apple production ios push services")) { throw new CertificateEnvironmentMismatchException("Invalid environment for this certificate"); } }
Checks a certificate for it's validity, as well as that it's a push certificate.
public static String checkNull(String string1,String string2){ if (string1 != null) return string1; else if (string2 != null) return string2; else return ""; }
Returns the first passed String if not null, otherwise the second if not null, otherwise an empty but non-null String.
public static boolean supportsAdd(int type){ switch (type) { case Value.BYTE: case Value.DECIMAL: case Value.DOUBLE: case Value.FLOAT: case Value.INT: case Value.LONG: case Value.SHORT: return true; default : return false; } }
Check if the given value type supports the add operation.
private static String processStringWithRegex(String text,Pattern pattern,int startIndex,boolean recurseEmojify){ Matcher matcher=pattern.matcher(text); StringBuffer sb=new StringBuffer(); int resetIndex=0; if (startIndex > 0) { matcher.region(startIndex,text.length()); } while (matcher.find()) { String emojiCode=matcher.group(); Emoji emoji=getEmoji(emojiCode); if (emoji != null) { matcher.appendReplacement(sb,emoji.getEmoji()); } else { if (htmlSurrogateEntityPattern2.matcher(emojiCode).matches()) { String highSurrogate1=matcher.group("H1"); String highSurrogate2=matcher.group("H2"); String lowSurrogate1=matcher.group("L1"); String lowSurrogate2=matcher.group("L2"); matcher.appendReplacement(sb,processStringWithRegex(highSurrogate1 + highSurrogate2,shortCodeOrHtmlEntityPattern,0,false)); if (sb.toString().endsWith(highSurrogate2)) { resetIndex=sb.length() - highSurrogate2.length(); } else { resetIndex=sb.length(); } sb.append(lowSurrogate1); sb.append(lowSurrogate2); break; } else if (htmlSurrogateEntityPattern.matcher(emojiCode).matches()) { String highSurrogate=matcher.group("H"); String lowSurrogate=matcher.group("L"); matcher.appendReplacement(sb,processStringWithRegex(highSurrogate,htmlEntityPattern,0,true)); resetIndex=sb.length(); sb.append(lowSurrogate); break; } else { matcher.appendReplacement(sb,emojiCode); } } } matcher.appendTail(sb); if (recurseEmojify && resetIndex > 0) { return emojify(sb.toString(),resetIndex); } return sb.toString(); }
Common method used for processing the string to replace with emojis
public Property millisOfSecond(){ return new Property(this,getChronology().millisOfSecond()); }
Get the millis of second property
public static boolean isValidSubnet(int hash){ int bits=0; while ((hash & 0b1) == 0 && bits < 31) { hash>>=1; bits++; } while ((hash & 0b1) == 1 && bits < 32) { hash>>=1; bits++; } return bits == 32; }
Makes sure there are no high bits less significant than low bits.
public int hashCode(){ return name.hashCode(); }
Returns the hash code for this GeneralName.
public void paintTabbedPaneTabBackground(SynthContext context,Graphics g,int x,int y,int w,int h,int tabIndex,int orientation){ paintTabbedPaneTabBackground(context,g,x,y,w,h,tabIndex); }
Paints the background of a tab of a tabbed pane. This implementation invokes the method of the same name without the orientation.
private void deleteImpl(final int startIndex,final int endIndex,final int len){ System.arraycopy(buffer,endIndex,buffer,startIndex,size - endIndex); size-=len; }
Internal method to delete a range without validation.
public final float readFloat() throws IOException { return Float.intBitsToFloat(readInt()); }
Reads a <code>float</code> from this file. This method reads an <code>int</code> value as if by the <code>readInt</code> method and then converts that <code>int</code> to a <code>float</code> using the <code>intBitsToFloat</code> method in class <code>Float</code>. <p/> This method blocks until the four bytes are read, the end of the stream is detected, or an exception is thrown.
protected AssociationRequest(ParameterList params){ super(params); }
Constructs an AssociationRequest message from a parameter list. <p> Useful for processing incoming messages.
public AbLetterFilterListView(Context context){ super(context); init(context); }
Instantiates a new ab letter filter list view.
protected MoreCode_Impl(){ super(); }
<!-- begin-user-doc --> <!-- end-user-doc -->
public Poloni(){ super(2,2); }
Constructs the Poloni problem.
public RangeCondition includeLower(Boolean includeLower){ this.includeLower=includeLower; return this; }
Sets if the lower value must be included.
private PathDataEvaluator(){ }
Create a PathParser.PathDataNode[] that does not reuse the animated value. Care must be taken when using this option because on every evaluation a new <code>PathParser.PathDataNode[]</code> will be allocated.
@DSComment("From safe class list") @DSSafe(DSCat.SAFE_LIST) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:57:21.282 -0500",hash_original_method="217DDC96D1B25C0D1457937D523A3AA4",hash_generated_method="8D3841501153DC8DC4D44C4E93EC71D1") public final void signal(){ if (!isHeldExclusively()) throw new IllegalMonitorStateException(); Node first=firstWaiter; if (first != null) doSignal(first); }
Moves the longest-waiting thread, if one exists, from the wait queue for this condition to the wait queue for the owning lock.
public UserActiveException(){ super(); }
Constructs a new exception with <code>null</code> as its detail message. The cause is not initialized.
public void updateAccessTime(){ attributes.setLastAccessedTime(System.currentTimeMillis()); }
Update the last accessed time
protected List<double[]> categorize(){ int[] n=new int[numberOfGroups]; for ( Observation observation : data) { n[observation.getGroup()]++; } List<double[]> groupedData=new ArrayList<double[]>(); for (int i=0; i < numberOfGroups; i++) { groupedData.add(new double[n[i]]); } for ( Observation observation : data) { int group=observation.getGroup(); n[group]--; groupedData.get(group)[n[group]]=observation.getValue(); } return groupedData; }
Organizes the observations by their group.
@Override public void close(){ if (root == null) { throw new IllegalStateException(ERROR_CLOSED); } fileStore.lock.lock(); try { super.close(); fileStore.close(); if (openCloseEvent != null) { openCloseEvent.end(); openCloseEvent=null; } } finally { fileStore.lock.unlock(); } }
Extended to also close the backing file.
public <T>DataStream<T> foldNeighbors(T initialValue,final EdgesFold<K,EV,T> foldFunction){ return windowedStream.fold(initialValue,new EdgesFoldFunction<K,EV,T>(foldFunction)); }
Performs a neighborhood fold on the graph window stream.
void add(Iterable<S3TimeData> newData){ assert newData != null; synchronized (mux) { for ( S3TimeData data : newData) map.put(data.getKey(),data); mux.notifyAll(); } }
Adds list of data this task should look after.
@Override public boolean isMultiple(){ return getReferenceGeometry().isMultiple(); }
Method isMultiple()
public void paintMenuBarBackground(SynthContext context,Graphics g,int x,int y,int w,int h){ }
Paints the background of a menu bar.
public String toString(){ return name; }
Returns the string representation of this Scale object. The string representation is the name of the Scale object.
public static void markInActiveUnManagedVolumes(StorageSystem storageSystem,Set<URI> discoveredUnManagedVolumes,DbClient dbClient,PartitionManager partitionManager){ _log.info(" -- Processing {} discovered UnManaged Volumes Objects from -- {}",discoveredUnManagedVolumes.size(),storageSystem.getLabel()); if (discoveredUnManagedVolumes.isEmpty()) { return; } URIQueryResultList allAvailableUnManagedVolumesInDB=new URIQueryResultList(); dbClient.queryByConstraint(ContainmentConstraint.Factory.getStorageDeviceUnManagedVolumeConstraint(storageSystem.getId()),allAvailableUnManagedVolumesInDB); Set<URI> unManagedVolumesInDBSet=new HashSet<URI>(); Iterator<URI> allAvailableUnManagedVolumesItr=allAvailableUnManagedVolumesInDB.iterator(); while (allAvailableUnManagedVolumesItr.hasNext()) { unManagedVolumesInDBSet.add(allAvailableUnManagedVolumesItr.next()); } SetView<URI> onlyAvailableinDB=Sets.difference(unManagedVolumesInDBSet,discoveredUnManagedVolumes); _log.info("Diff :" + Joiner.on("\t").join(onlyAvailableinDB)); if (!onlyAvailableinDB.isEmpty()) { List<UnManagedVolume> unManagedVolumeTobeDeleted=new ArrayList<UnManagedVolume>(); Iterator<UnManagedVolume> unManagedVolumes=dbClient.queryIterativeObjects(UnManagedVolume.class,new ArrayList<URI>(onlyAvailableinDB)); while (unManagedVolumes.hasNext()) { UnManagedVolume volume=unManagedVolumes.next(); if (null == volume || volume.getInactive()) { continue; } _log.info("Setting unManagedVolume {} inactive",volume.getId()); volume.setStoragePoolUri(NullColumnValueGetter.getNullURI()); volume.setStorageSystemUri(NullColumnValueGetter.getNullURI()); volume.setInactive(true); unManagedVolumeTobeDeleted.add(volume); } if (!unManagedVolumeTobeDeleted.isEmpty()) { partitionManager.updateAndReIndexInBatches(unManagedVolumeTobeDeleted,1000,dbClient,UNMANAGED_VOLUME); } } }
This method cleans up UnManaged Volumes in DB, which had been deleted manually from the Array 1. Get All UnManagedVolumes from DB 2. Store URIs of unmanaged volumes returned from the Provider in unManagedVolumesBookKeepingList. 3. If unmanaged volume is found only in DB, but not in unManagedVolumesBookKeepingList, then set unmanaged volume to inactive. DB | Provider x,y,z | y,z.a [a --> new entry has been added but indexes didn't get added yet into DB] x--> will be set to inactive
public void endPreserveAspectRatio() throws ParseException { hasPreserveAspectRatio=true; }
Invoked when the PreserveAspectRatio parsing ends.
@Override public int compareTo(Object o){ int result=-1; if (o != null && o instanceof RyaType) { result=0; RyaType other=(RyaType)o; if (this.data != other.data) { if (this.data == null) return 1; if (other.data == null) return -1; result=this.data.compareTo(other.data); } if (result == 0 && this.dataType != other.dataType) { if (this.dataType == null) return 1; if (other.dataType == null) return -1; result=this.dataType.toString().compareTo(other.dataType.toString()); } } return result; }
Define a natural ordering based on data and datatype.
private File createMultiBitRuntime() throws IOException { File multiBitDirectory=FileHandler.createTempDirectory("CreateAndDeleteWalletsTest"); String multiBitDirectoryPath=multiBitDirectory.getAbsolutePath(); System.out.println("Building MultiBit runtime in : " + multiBitDirectory.getAbsolutePath()); File multibitProperties=new File(multiBitDirectoryPath + File.separator + "multibit.properties"); multibitProperties.createNewFile(); multibitProperties.deleteOnExit(); File multibitCheckpoints=new File(multiBitDirectoryPath + File.separator + "multibit.checkpoints"); FileHandler.copyFile(new File("./src/main/resources/multibit.checkpoints"),multibitCheckpoints); multibitCheckpoints.deleteOnExit(); return multiBitDirectory; }
Create a working, portable runtime of MultiBit in a temporary directory.
public void tasks(){ log.info("Started PeerManager tasks."); garbageCollectPeers(); log.info("Finished with PeerManager tasks."); }
Run tasks, e.g. garbage collection of peers, speaker tasks, etc.
public CToggleSelectedGroupsAction(final ZyGraph graph){ super("Open/Close Selected Groups"); m_graph=Preconditions.checkNotNull(graph,"IE02841: graph argument can not be null"); putValue(ACCELERATOR_KEY,HotKeys.GRAPH_TOGGLE_SELECTED_GROUPS_HK.getKeyStroke()); }
Creates a new action object.
public static boolean canReplacePart(World world,BlockPos pos,String oldType,IMultipart newPart){ IMultipartContainer container=getPartContainer(world,pos); if (container == null) return false; IMultipart oldPart=null; for ( IMultipart part : container.getParts()) { if (part.getType().equals(oldType)) { oldPart=part; break; } } return container.canReplacePart(oldPart,newPart); }
Checks whether or not a part of the specified type can be replaced by another part to the world.
public void filter(String query){ mSearchViewExpanded=false; mFilter=query; mFavoriteManager.attach(getActivity(),getLoaderManager(),this,mFilter); }
Filters list data by given query
public DeviceScale(Component parent,AppProperties props){ StringParser sd=new StringParser(AppConfig.getInstance().getProperty("machine.scale")); String sScaleType=sd.nextToken(':'); String sScaleParam1=sd.nextToken(','); switch (sScaleType) { case "Adam Equipment": m_scale=new ScaleAdam(sScaleParam1,parent); break; case "casiopd1": m_scale=new ScaleCasioPD1(sScaleParam1); break; case "dialog1": m_scale=new ScaleComm(sScaleParam1); break; case "samsungesp": m_scale=new ScaleSamsungEsp(sScaleParam1); break; case "caspdii": m_scale=new ScaleCASPDII(sScaleParam1); break; case "fake": m_scale=new ScaleFake(); break; case "screen": m_scale=new ScaleDialog(parent); break; default : m_scale=null; break; } }
Creates a new instance of DeviceScale
public RevealOutputGraph bool2(int k){ int[][] parents=new int[ngenes][]; int[][] lags=new int[ngenes][]; int[] f=new int[ngenes]; int numberTotalInputs=1; for (int i=0; i < ngenes; i++) { numberTotalInputs*=2; } int numberInputCombinations=1; for (int i=0; i < k; i++) { numberInputCombinations*=2; } double theta0=1.0 / (2.0 * numberInputCombinations * numberInputCombinations); double theta=theta0; System.out.println("Theta = " + theta); int numberBooleanFunctions=1; for (int i=0; i < numberInputCombinations; i++) { numberBooleanFunctions*=2; } System.out.println("nrows = " + numberInputCombinations + " number functions = "+ numberBooleanFunctions); for (int gchild=0; gchild < ngenes; gchild++) { System.out.println("Child gene " + gchild); TH: for (int m=1; m <= 60; m++) { theta=theta0 * m; System.out.println("Theta = " + theta); int count=0; int[] pars=new int[k]; pars[0]=-1; pars[1]=-1; pars[2]=-1; for (int input=0; input < numberTotalInputs; input++) { byte[] inputs=booleanRepresentation(input,ngenes); if (sumBits(inputs) == k) { int j=0; for (int i=0; i < ngenes; i++) { if (inputs[i] == 1) { pars[j]=i; j++; } } } else { continue; } for (int function=0; function < numberBooleanFunctions; function++) { byte[] fi=booleanRepresentation(function,numberInputCombinations); int mismatch=0; for (int j=0; j < ntimes - 1; j++) { boolean match=true; int argument=0; int power=1; for (int i=0; i < k; i++) { argument+=power * cases[j][pars[k - i - 1]]; power*=2; } int finput=fi[argument]; if (finput != cases[j + 1][gchild]) { mismatch++; } } if (mismatch < theta * ntimes) { System.out.println("update parents"); parents[gchild]=new int[k]; lags[gchild]=new int[k]; f[gchild]=function; for (int i=0; i < k; i++) { parents[gchild][i]=pars[i]; lags[gchild][i]=1; } count=1; break TH; } } } if (count != 1) { System.out.println("Regulators not identified count = " + count); parents[gchild]=new int[0]; lags[gchild]=new int[0]; } else { System.out.println("Regulators are: "); for (int i=0; i < parents[gchild].length; i++) { System.out.println(" i = " + i + " par = "+ parents[gchild][i]); } } } System.out.println("regulators are: "); for (int i=0; i < parents[gchild].length; i++) { System.out.println(" i = " + i + " par = "+ parents[gchild][i]); } } System.out.println("Returning"); return null; }
Implements the BOOL-2 algorithm of Akutsu, et al, found in section 2.2 of their paper "Algorithms for Inferring Qualitative Models of Biological Networks". </p> The int k is the number of number of regulators of a given gene and corresponds to K in the paper.
SelectionEventHandler(final VisionWorld visionWorld){ super(); if (visionWorld == null) { throw new IllegalArgumentException("visionWorld must not be null"); } this.visionWorld=visionWorld; this.selectionModel=visionWorld.getSensorSelectionModel(); }
Create a new selection event handler for the specified vision world.
public byte[] readBitsArray(final int items,final JBBPBitNumber bitNumber) throws IOException { return _readArray(items,bitNumber); }
Read array of bit sequence.
public HistogramTableModel(){ }
Creates a new instance of HistogramTableModel
public synchronized boolean hasAnyRelationshipToTarget(Vertex target){ Iterator<Relationship> relationships=allRelationships(); while (relationships.hasNext()) { Relationship relationship=relationships.next(); if (!relationship.isInverse() && relationship.getTarget().equals(target)) { return true; } } return false; }
Return if the vertex has any relationship to any target.
public static final XResourceBundle loadResourceBundle(String className,Locale locale) throws MissingResourceException { String suffix=getResourceSuffix(locale); try { String resourceName=className + suffix; return (XResourceBundle)ResourceBundle.getBundle(resourceName,locale); } catch ( MissingResourceException e) { try { return (XResourceBundle)ResourceBundle.getBundle(XSLT_RESOURCE,new Locale("en","US")); } catch ( MissingResourceException e2) { throw new MissingResourceException("Could not load any resource bundles.",className,""); } } }
Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle().
public synchronized void writeExternal(ObjectOutput os) throws IOException { if (mimeType != null) { mimeType.setParameter("humanPresentableName",humanPresentableName); os.writeObject(mimeType); mimeType.removeParameter("humanPresentableName"); } else { os.writeObject(null); } os.writeObject(representationClass); }
Serializes this <code>DataFlavor</code>.
public void miny(int parseInt){ miny=parseInt; tileBoundsSet=true; }
Set the starting y number of the subjar file to create. Depends on the subjar zoom to figure out what that means.