Package org.joda.time

Examples of org.joda.time.Interval


  @Override
  protected TaskFileEvent createEventDiff(DateTime dateTime) {
    LocalTask task = new LocalTask("taskId", "what?");
    task.setCreationDate(dateTime.toDate());
    return new TaskFileEvent(new Interval(dateTime, dateTime.plus(1)),
        new Path("/p/f/a"), task);
  }
View Full Code Here


  @Override
  protected TaskFileEvent createEvent(DateTime dateTime) {
    LocalTask task = new LocalTask("tas1kId", "what?1");
    task.setCreationDate(dateTime.toDate());
    return new TaskFileEvent(new Interval(dateTime, dateTime.plus(2)),
        new Path("/a/b/c"), task);
  }
View Full Code Here

                               DataStore.FILE_STORE);
  }

  @Override
  protected FileEvent createEvent(DateTime t) {
    return new FileEvent(new Interval(t, t.plus(1)), new Path("/some"));
  }
View Full Code Here

    return new FileEvent(new Interval(t, t.plus(1)), new Path("/some"));
  }

  @Override
  protected FileEvent createEventDiff(DateTime t) {
    return new FileEvent(new Interval(t, t.plus(2)), new Path("/some/some"));
  }
View Full Code Here

       * "C:/a.txt". We want workspace paths wherever possible.
       */
      if (input instanceof IFileEditorInput) {
        // Contains a file in the workspace
        IFile file = ((IFileEditorInput) input).getFile();
        return new TaskFileEvent(new Interval(start, end), file.getFullPath(), task);

      } else if (input instanceof IURIEditorInput) {
        // A file outside of workspace
        URI uri = ((IURIEditorInput) input).getURI();
        IPath path = new Path(uri.getPath());
        return new TaskFileEvent(new Interval(start, end), path, task);
      }
    }
    return null;
  }
View Full Code Here

    }
  }

  @Override
  protected PartEvent createEvent() {
    return new PartEvent(new Interval(0, 1),
        WorkbenchUtil.getActiveWindow().getPartService().getActivePart());
  }
View Full Code Here

    given(type.getIdentifier()).willReturn("typeId");
    ILaunchConfiguration config = mock(ILaunchConfiguration.class);
    given(config.getName()).willReturn("name");
    ILaunch launch = mock(ILaunch.class);
    given(launch.getLaunchMode()).willReturn("run");
    return new LaunchEvent(new Interval(0, 1), launch, config, type,
        new HashSet<IPath>(Arrays.asList(new Path("/1"), new Path("/2"))));
  }
View Full Code Here

    return new FileEventConverter();
  }

  @Override
  public void testConvert() throws Exception {
    FileEvent event = new FileEvent(new Interval(0, 1), new Path("/file/acb"));
    FileEventType type = converter.convert(event);
    assertEquals(event.getFilePath().toString(), type.getFilePath());
    assertEquals(event.getInterval().toDurationMillis(), type.getDuration());
  }
View Full Code Here

public class SessionEventStorerTest extends
    AbstractStorerTest<SessionEvent, SessionEventType, SessionEventListType> {

  @Override
  protected SessionEvent createEvent(DateTime dateTime) throws Exception {
    return new SessionEvent(new Interval(dateTime, dateTime.plus(1)));
  }
View Full Code Here

    return new SessionEvent(new Interval(dateTime, dateTime.plus(1)));
  }

  @Override
  protected SessionEvent createEventDiff(DateTime dateTime) throws Exception {
    return new SessionEvent(new Interval(dateTime, dateTime.plus(2)));
  }
View Full Code Here

TOP

Related Classes of org.joda.time.Interval

Copyright © 2018 www.massapicom. 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.