Examples of Partition


Examples of org.jitterbit.ui.text.partition.TextPartitioner.Partition

    private final class PrintTokensAction extends AbstractAction {

        @Override
        public void actionPerformed(ActionEvent e) {
            Partition p = partitioner.getFirst();
            while (p != null) {
                System.out.println(p.token.getClass().getSimpleName() + ": " + DocumentUtils.getText(getDocument(), p));
                p = p.getNext();
            }
        }
View Full Code Here

Examples of org.jnode.test.fs.driver.Partition

        }

        public Object invoke(Invocation invocation) throws Throwable {
            int index = ((Integer) invocation.parameterValues.get(0))
                .intValue();
            Partition part = partitions[index];
            IBMPartitionTableEntry entry = createEntry(index,
                part.isExtended(), part.getStartLba(), part.getNbSectors());
            return entry;
        }
View Full Code Here

Examples of org.omg.uml.behavioralelements.activitygraphs.Partition

        return getStateMachine();
    }

    protected Object handleGetPartition()
    {
        Partition thePartition = null;

        final StateMachine stateMachine = metaObject.getContainer().getStateMachine();
        if (stateMachine instanceof ActivityGraph)
        {
            final ActivityGraph activityGraph = (ActivityGraph)stateMachine;
            final Collection partitions = activityGraph.getPartition();
            for (final Iterator partitionIterator = partitions.iterator(); partitionIterator.hasNext() && thePartition == null;)
            {
                final Partition partition = (Partition)partitionIterator.next();
                if (partition.getContents().contains(metaObject))
                {
                    thePartition = partition;
                }
            }
        }
View Full Code Here

Examples of org.openhab.binding.dscalarm.internal.model.Partition

            panel.refreshItem(item, config, eventPublisher);
          }
          break;
        case PARTITION:
          partitionId = config.getPartitionId();
          Partition partition = partitionMap.get(partitionId);
          if(partition == null) {
            partition = new Partition(partitionId);
            partitionMap.put(partitionId, partition);
          }
         
          if(event != null) {
            partition.handleEvent(item, config, eventPublisher, event);
          }
          else {
            partition.refreshItem(item, config, eventPublisher);
          }
          break;
        case ZONE:
          partitionId = config.getPartitionId();
          zoneId = config.getZoneId();
View Full Code Here

Examples of org.openstreetmap.josm.plugins.continuosDownload.BoxStrategy.Partition

public class BoxStrategyUnionTest {

    @Test
    public void test() {
        Partition a = new Partition();
        a = a.add(new Box(0, 0, 1, 1), 0);
        assertEquals(1, a.box.size());
        assertEquals(1, a.area(), 0.0000001);
        assertEquals(1, a.enclosingArea, 0.0000001);

        Partition b = a.add(new Box(1, 1, 2, 2), 0);
        assertEquals(1, b.box.size());
        assertEquals(4, b.area(), 0.0000001);
        assertEquals(2, b.enclosingArea, 0.0000001);

        Partition c = a.add(new Box(1, 1, 2, 2), 1);
        assertEquals(2, c.box.size());
        assertEquals(2, c.area(), 0.0000001);
        assertEquals(2, c.enclosingArea, 0.0000001);

        assertTrue(b.compareTo(c) > 0);
    }
View Full Code Here

Examples of org.voltdb.catalog.Partition

                catalog_site.setProc_port(proc_port++);
                catalog_site.setMessenger_port(messenger_port++);

                // Add all the partitions
                for (Integer partition_id : cc.getPartitionIds(host, siteid)) {
                    Partition catalog_part = catalog_site.getPartitions().add(partition_id.toString());
                    assert (catalog_part != null);
                    catalog_part.setId(partition_id);
                    partition_ctr++;
                } // FOR

            } // FOR
            host_id++;
View Full Code Here

Examples of samples.integer.Partition

* @since 16/03/11
*/
public class PartitionTest {

    protected Solver modeler(int size) {
        Partition pb;
        pb = new Partition();
        pb.readArgs("-n", Integer.toString(size));
        pb.createSolver();
        pb.buildModel();
        pb.configureSearch();
        return pb.getSolver();
    }
View Full Code Here

Examples of storm.kafka.Partition

    }

    public List<Partition> getOrderedPartitions() {
        List<Partition> partitions = new LinkedList<Partition>();
        for (Map.Entry<Integer, Broker> partition : partitionMap.entrySet()) {
            partitions.add(new Partition(partition.getValue(), partition.getKey()));
        }
        return partitions;
    }
View Full Code Here

Examples of storm.kafka.Partition

            }

            @Override
            public Partition next() {
                Map.Entry<Integer, Broker> next = iterator.next();
                return new Partition(next.getValue(), next.getKey());
            }

            @Override
            public void remove() {
                iterator.remove();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.