conversation listlengths 2 2 |
|---|
[
{
"content": "Read a nested table whose contents we don't understand.\n\n@param rowSize fixed row size\n@param rowMagicNumber row magic number\n@return table rows",
"role": "user"
},
{
"content": "public List<MapRow> readUnknownTable(int rowSize, int rowMagicNumber) throws IOException\n {\n T... |
[
{
"content": "Reads a nested table. Uses the supplied reader class instance.\n\n@param readerClass reader class instance\n@return table rows",
"role": "user"
},
{
"content": "public List<MapRow> readTable(Class<? extends TableReader> readerClass) throws IOException\n {\n TableReader reader;\n... |
[
{
"content": "Conditionally read a nested table based in the value of a boolean flag which precedes the table data.\n\n@param readerClass reader class\n@return table rows or empty list if table not present",
"role": "user"
},
{
"content": "public List<MapRow> readTableConditional(Class<? extends Tab... |
[
{
"content": "Read an array of bytes of a specified size.\n\n@param size number of bytes to read\n@return ByteArray instance",
"role": "user"
},
{
"content": "public ByteArray readBytes(int size) throws IOException\n {\n byte[] data = new byte[size];\n m_stream.read(data);\n return ... |
[
{
"content": "Read a list of fixed size blocks using an instance of the supplied reader class.\n\n@param readerClass reader class\n@return list of blocks",
"role": "user"
},
{
"content": "public List<MapRow> readBlocks(Class<? extends BlockReader> readerClass) throws IOException\n {\n BlockRe... |
[
{
"content": "Reads a PEP file from the input stream.\n\n@param is input stream representing a PEP file",
"role": "user"
},
{
"content": "private void readFile(InputStream is) throws IOException\n {\n StreamHelper.skip(is, 64);\n int index = 64;\n\n ArrayList<Integer> offsetList = n... |
[
{
"content": "Read calendar data from a PEP file.",
"role": "user"
},
{
"content": "private void readCalendars()\n {\n //\n // Create the calendars\n //\n for (MapRow row : getTable(\"NCALTAB\"))\n {\n ProjectCalendar calendar = m_projectFile.addCalendar();\n ... |
[
{
"content": "Read exceptions for a calendar.\n\n@param table calendar exception data\n@param calendar calendar\n@param exceptionID first exception ID",
"role": "user"
},
{
"content": "private void addCalendarExceptions(Table table, ProjectCalendar calendar, Integer exceptionID)\n {\n Integer... |
[
{
"content": "Read resource data from a PEP file.",
"role": "user"
},
{
"content": "private void readResources()\n {\n for (MapRow row : getTable(\"RTAB\"))\n {\n Resource resource = m_projectFile.addResource();\n setFields(RESOURCE_FIELDS, row, resource);\n m_eve... |
[
{
"content": "Read task data from a PEP file.",
"role": "user"
},
{
"content": "private void readTasks()\n {\n Integer rootID = Integer.valueOf(1);\n readWBS(m_projectFile, rootID);\n readTasks(rootID);\n m_projectFile.getTasks().synchronizeTaskIDToHierarchy();\n }",
"rol... |
[
{
"content": "Recursively read the WBS structure from a PEP file.\n\n@param parent parent container for tasks\n@param id initial WBS ID",
"role": "user"
},
{
"content": "private void readWBS(ChildTaskContainer parent, Integer id)\n {\n Integer currentID = id;\n Table table = getTable(\"W... |
[
{
"content": "Read leaf tasks attached to the WBS.\n\n@param id initial WBS ID",
"role": "user"
},
{
"content": "private void readTasks(Integer id)\n {\n Integer currentID = id;\n Table table = getTable(\"WBSTAB\");\n\n while (currentID.intValue() != 0)\n {\n MapRow row... |
[
{
"content": "Read the leaf tasks for an individual WBS node.\n\n@param parent parent task\n@param id first task ID",
"role": "user"
},
{
"content": "private void readLeafTasks(Task parent, Integer id)\n {\n Integer currentID = id;\n Table table = getTable(\"A1TAB\");\n while (curre... |
[
{
"content": "Read data for an individual task from the tables in a PEP file.\n\n@param parent parent task\n@param id task ID\n@return task instance",
"role": "user"
},
{
"content": "private Task readTask(ChildTaskContainer parent, Integer id)\n {\n Table a0 = getTable(\"A0TAB\");\n Tabl... |
[
{
"content": "Read relationship data from a PEP file.",
"role": "user"
},
{
"content": "private void readRelationships()\n {\n for (MapRow row : getTable(\"CONTAB\"))\n {\n Task task1 = m_projectFile.getTaskByUniqueID(row.getInteger(\"TASK_ID_1\"));\n Task task2 = m_proje... |
[
{
"content": "Read resource assignment data from a PEP file.",
"role": "user"
},
{
"content": "private void readResourceAssignments()\n {\n for (MapRow row : getTable(\"USGTAB\"))\n {\n Task task = m_projectFile.getTaskByUniqueID(row.getInteger(\"TASK_ID\"));\n Resource r... |
[
{
"content": "Retrieve a table by name.\n\n@param name table name\n@return Table instance",
"role": "user"
},
{
"content": "private Table getTable(String name)\n {\n Table table = m_tables.get(name);\n if (table == null)\n {\n table = EMPTY_TABLE;\n }\n return tabl... |
[
{
"content": "Configure column aliases.",
"role": "user"
},
{
"content": "private void applyAliases()\n {\n CustomFieldContainer fields = m_projectFile.getCustomFields();\n for (Map.Entry<FieldType, String> entry : ALIASES.entrySet())\n {\n fields.getCustomField(entry.getKey... |
[
{
"content": "Configure the mapping between a database column and a field, including definition of\nan alias.\n\n@param container column to field map\n@param name column name\n@param type field type\n@param alias field alias",
"role": "user"
},
{
"content": "private static void defineField(Map<Strin... |
[
{
"content": "Retrieves a string value from the extended data.\n\n@param type Type identifier\n@return string value",
"role": "user"
},
{
"content": "public String getString(Integer type)\n {\n String result = null;\n\n byte[] item = m_map.get(type);\n if (item != null)\n {\n ... |
[
{
"content": "Retrieves an integer value from the extended data.\n\n@param type Type identifier\n@return integer value",
"role": "user"
},
{
"content": "public int getInt(Integer type)\n {\n int result = 0;\n\n byte[] item = m_map.get(type);\n if (item != null)\n {\n re... |
[
{
"content": "Retrieves a long value from the extended data.\n\n@param type Type identifier\n@return long value",
"role": "user"
},
{
"content": "public long getLong(Integer type)\n {\n long result = 0;\n\n byte[] item = m_map.get(type);\n if (item != null)\n {\n result... |
[
{
"content": "Extract assignment hyperlink data.\n\n@param assignment assignment instance\n@param data hyperlink data",
"role": "user"
},
{
"content": "private void processHyperlinkData(ResourceAssignment assignment, byte[] data)\n {\n if (data != null)\n {\n int offset = 12;\n\n... |
[
{
"content": "Method used to create missing timephased data.\n\n@param file project file\n@param assignment resource assignment\n@param timephasedPlanned planned timephased data\n@param timephasedComplete complete timephased data",
"role": "user"
},
{
"content": "private void createTimephasedData(Pr... |
[
{
"content": "Print a timestamp value.\n\n@param value time value\n@return time value",
"role": "user"
},
{
"content": "public static final String printTimestamp(Date value)\n {\n return (value == null ? null : TIMESTAMP_FORMAT.get().format(value));\n }",
"role": "assistant"
}
] |
[
{
"content": "Parse a duration value.\n\n@param value duration value\n@return Duration instance",
"role": "user"
},
{
"content": "public static final Duration parseDuration(String value)\n {\n return value == null ? null : Duration.getInstance(Double.parseDouble(value), TimeUnit.DAYS);\n }"... |
[
{
"content": "Print a duration value.\n\n@param value Duration instance\n@return string representation of a duration",
"role": "user"
},
{
"content": "public static final String printDuration(Duration value)\n {\n return value == null ? null : Double.toString(value.getDuration());\n }",
... |
[
{
"content": "Print a date.\n\n@param value Date instance\n@return string representation of a date",
"role": "user"
},
{
"content": "public static final String printDate(Date value)\n {\n return (value == null ? null : DATE_FORMAT.get().format(value));\n }",
"role": "assistant"
}
] |
[
{
"content": "Parse a percent complete value.\n\n@param value sting representation of a percent complete value.\n@return Double instance",
"role": "user"
},
{
"content": "public static final Double parsePercent(String value)\n {\n return value == null ? null : Double.valueOf(Double.parseDoubl... |
[
{
"content": "Print a percent complete value.\n\n@param value Double instance\n@return percent complete value",
"role": "user"
},
{
"content": "public static final String printPercent(Double value)\n {\n return value == null ? null : Double.toString(value.doubleValue() / 100.0);\n }",
"... |
[
{
"content": "Gets the value of the ppvItem property.\n\n<p>\nThis accessor method returns a reference to the live list,\nnot a snapshot. Therefore any modification you make to the\nreturned list will be present inside the JAXB object.\nThis is why there is not a <CODE>set</CODE> method for the ppvItem property... |
[
{
"content": "Retrieve configuration details for a given custom field.\n\n@param field required custom field\n@return configuration detail",
"role": "user"
},
{
"content": "public CustomField getCustomField(FieldType field)\n {\n CustomField result = m_configMap.get(field);\n if (result ... |
[
{
"content": "When an alias for a field is added, index it here to allow lookup by alias and type.\n\n@param type field type\n@param alias field alias",
"role": "user"
},
{
"content": "void registerAlias(FieldType type, String alias)\n {\n m_aliasMap.put(new Pair<FieldTypeClass, String>(type.... |
[
{
"content": "Retrieve a field from a particular entity using its alias.\n\n@param typeClass the type of entity we are interested in\n@param alias the alias\n@return the field type referred to be the alias, or null if not found",
"role": "user"
},
{
"content": "public FieldType getFieldByAlias(Field... |
[
{
"content": "Generic method used to create a field map from a block of data.\n\n@param data field map data",
"role": "user"
},
{
"content": "private void createFieldMap(byte[] data)\n {\n int index = 0;\n int lastDataBlockOffset = 0;\n int dataBlockIndex = 0;\n\n while (index ... |
[
{
"content": "Creates a field map for tasks.\n\n@param props props data",
"role": "user"
},
{
"content": "public void createTaskFieldMap(Props props)\n {\n byte[] fieldMapData = null;\n for (Integer key : TASK_KEYS)\n {\n fieldMapData = props.getByteArray(key);\n if ... |
[
{
"content": "Creates a field map for relations.\n\n@param props props data",
"role": "user"
},
{
"content": "public void createRelationFieldMap(Props props)\n {\n byte[] fieldMapData = null;\n for (Integer key : RELATION_KEYS)\n {\n fieldMapData = props.getByteArray(key);\n... |
[
{
"content": "Create a field map for enterprise custom fields.\n\n@param props props data\n@param c target class",
"role": "user"
},
{
"content": "public void createEnterpriseCustomFieldMap(Props props, Class<?> c)\n {\n byte[] fieldMapData = null;\n for (Integer key : ENTERPRISE_CUSTOM_... |
[
{
"content": "Creates a field map for resources.\n\n@param props props data",
"role": "user"
},
{
"content": "public void createResourceFieldMap(Props props)\n {\n byte[] fieldMapData = null;\n for (Integer key : RESOURCE_KEYS)\n {\n fieldMapData = props.getByteArray(key);\n... |
[
{
"content": "Creates a field map for assignments.\n\n@param props props data",
"role": "user"
},
{
"content": "public void createAssignmentFieldMap(Props props)\n {\n //System.out.println(\"ASSIGN\");\n byte[] fieldMapData = null;\n for (Integer key : ASSIGNMENT_KEYS)\n {\n ... |
[
{
"content": "This method takes an array of data and uses this to populate the\nfield map.\n\n@param defaultData field map default data",
"role": "user"
},
{
"content": "private void populateDefaultData(FieldItem[] defaultData)\n {\n for (FieldItem item : defaultData)\n {\n m_map... |
[
{
"content": "Given a container, and a set of raw data blocks, this method extracts\nthe field data and writes it into the container.\n\n@param type expected type\n@param container field container\n@param id entity ID\n@param fixedData fixed data block\n@param varData var data block",
"role": "user"
},
... |
[
{
"content": "Retrieve the fixed data offset for a specific field.\n\n@param type field type\n@return offset",
"role": "user"
},
{
"content": "public int getFixedDataOffset(FieldType type)\n {\n int result;\n FieldItem item = m_map.get(type);\n if (item != null)\n {\n r... |
[
{
"content": "Retrieve the var data key for a specific field.\n\n@param type field type\n@return var data key",
"role": "user"
},
{
"content": "public Integer getVarDataKey(FieldType type)\n {\n Integer result = null;\n FieldItem item = m_map.get(type);\n if (item != null)\n {\... |
[
{
"content": "Used to map from a var data key to a field type. Note this\nis designed for diagnostic use only, and uses an inefficient search.\n\n@param key var data key\n@return field type",
"role": "user"
},
{
"content": "public FieldType getFieldTypeFromVarDataKey(Integer key)\n {\n FieldT... |
[
{
"content": "Retrieve the field location for a specific field.\n\n@param type field type\n@return field location",
"role": "user"
},
{
"content": "public FieldLocation getFieldLocation(FieldType type)\n {\n FieldLocation result = null;\n\n FieldItem item = m_map.get(type);\n if (it... |
[
{
"content": "Retrieve a single field value.\n\n@param id parent entity ID\n@param type field type\n@param fixedData fixed data block\n@param varData var data block\n@return field value",
"role": "user"
},
{
"content": "protected Object getFieldData(Integer id, FieldType type, byte[][] fixedData, Va... |
[
{
"content": "Diagnostic method used to dump known field map data.\n\n@param props props block containing field map data",
"role": "user"
},
{
"content": "public void dumpKnownFieldMaps(Props props)\n {\n //for (int key=131092; key < 131098; key++)\n for (int key = 50331668; key < 503316... |
[
{
"content": "Determine the size of a field in a fixed data block.\n\n@param type field data type\n@return field size in bytes",
"role": "user"
},
{
"content": "private int getFixedDataFieldSize(FieldType type)\n {\n int result = 0;\n DataType dataType = type.getDataType();\n if (da... |
[
{
"content": "Set the parent from which this week is derived.\n\n@param parent parent week",
"role": "user"
},
{
"content": "void setParent(ProjectCalendarWeek parent)\n {\n m_parent = parent;\n\n for (int loop = 0; loop < m_days.length; loop++)\n {\n if (m_days[loop] == nul... |
[
{
"content": "This method retrieves the calendar hours for the specified day.\nNote that if this is a derived calendar, then this method\nwill refer to the base calendar where no hours are specified\nin the derived calendar.\n\n@param day Day instance\n@return calendar hours",
"role": "user"
},
{
"c... |
[
{
"content": "This is a convenience method used to add a default set of calendar\nhours to a calendar.\n\n@param day Day for which to add default hours for",
"role": "user"
},
{
"content": "public void addDefaultCalendarHours(Day day)\n {\n ProjectCalendarHours hours = addCalendarHours(day);\... |
[
{
"content": "Used to add working hours to the calendar. Note that the MPX file\ndefinition allows a maximum of 7 calendar hours records to be added to\na single calendar.\n\n@param day day number\n@return new ProjectCalendarHours instance",
"role": "user"
},
{
"content": "public ProjectCalendarHour... |
[
{
"content": "Attaches a pre-existing set of hours to the correct\nday within the calendar.\n\n@param hours calendar hours instance",
"role": "user"
},
{
"content": "public void attachHoursToDay(ProjectCalendarHours hours)\n {\n if (hours.getParentCalendar() != this)\n {\n throw ... |
[
{
"content": "Removes a set of calendar hours from the day to which they\nare currently attached.\n\n@param hours calendar hours instance",
"role": "user"
},
{
"content": "public void removeHoursFromDay(ProjectCalendarHours hours)\n {\n if (hours.getParentCalendar() != this)\n {\n ... |
[
{
"content": "convenience method for setting working or non-working days.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"role": "user"
},
{
"content": "public void setWorkingDay(Day day, boolean working)\n {\n setWorkingDay(day, (working ? DayType.WO... |
[
{
"content": "This is a convenience method provided to allow a day to be set\nas working or non-working, by using the day number to\nidentify the required day.\n\n@param day required day\n@param working flag indicating if the day is a working day",
"role": "user"
},
{
"content": "public void setWork... |
[
{
"content": "Read the calendar data from a Gantt Designer file.\n\n@param gantt Gantt Designer file.",
"role": "user"
},
{
"content": "private void readCalendar(Gantt gantt)\n {\n Gantt.Calendar ganttCalendar = gantt.getCalendar();\n m_projectFile.getProjectProperties().setWeekStartDay(... |
[
{
"content": "Read task data from a Gantt Designer file.\n\n@param gantt Gantt Designer file",
"role": "user"
},
{
"content": "private void processTasks(Gantt gantt)\n {\n ProjectCalendar calendar = m_projectFile.getDefaultCalendar();\n\n for (Gantt.Tasks.Task ganttTask : gantt.getTasks(... |
[
{
"content": "Read predecessors from a Gantt Designer file.\n\n@param gantt Gantt Designer file",
"role": "user"
},
{
"content": "private void processPredecessors(Gantt gantt)\n {\n for (Gantt.Tasks.Task ganttTask : gantt.getTasks().getTask())\n {\n String predecessors = ganttTas... |
[
{
"content": "Read remarks from a Gantt Designer file.\n\n@param gantt Gantt Designer file",
"role": "user"
},
{
"content": "private void processRemarks(Gantt gantt)\n {\n processRemarks(gantt.getRemarks());\n processRemarks(gantt.getRemarks1());\n processRemarks(gantt.getRemarks2()... |
[
{
"content": "Read an individual remark type from a Gantt Designer file.\n\n@param remark remark type",
"role": "user"
},
{
"content": "private void processRemarks(GanttDesignerRemark remark)\n {\n for (GanttDesignerRemark.Task remarkTask : remark.getTask())\n {\n Integer id = re... |
[
{
"content": "Extract the parent WBS from a WBS.\n\n@param wbs current WBS\n@return parent WBS",
"role": "user"
},
{
"content": "private String getParentWBS(String wbs)\n {\n String result;\n int index = wbs.lastIndexOf('.');\n if (index == -1)\n {\n result = null;\n ... |
[
{
"content": "Retrieve the parent task based on its WBS.\n\n@param wbs parent WBS\n@return parent task",
"role": "user"
},
{
"content": "private ChildTaskContainer getParentTask(String wbs)\n {\n ChildTaskContainer result;\n String parentWbs = getParentWBS(wbs);\n if (parentWbs == n... |
[
{
"content": "Retrieves child nodes from a directory entry.\n\n@param parent parent directory entry\n@return list of child nodes",
"role": "user"
},
{
"content": "private List<Entry> getChildNodes(DirectoryEntry parent)\n {\n List<Entry> result = new ArrayList<Entry>();\n Iterator<Entry>... |
[
{
"content": "Notify listeners that the tree structure has changed.",
"role": "user"
},
{
"content": "private void fireTreeStructureChanged()\n {\n // Guaranteed to return a non-null array\n Object[] listeners = m_listenerList.getListenerList();\n TreeModelEvent e = null;\n // ... |
[
{
"content": "Retrieve the number of minutes per day for this calendar.\n\n@return minutes per day",
"role": "user"
},
{
"content": "public int getMinutesPerDay()\n {\n return m_minutesPerDay == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerDay()) : m_minutesP... |
[
{
"content": "Retrieve the number of minutes per week for this calendar.\n\n@return minutes per week",
"role": "user"
},
{
"content": "public int getMinutesPerWeek()\n {\n return m_minutesPerWeek == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerWeek()) : m_min... |
[
{
"content": "Retrieve the number of minutes per month for this calendar.\n\n@return minutes per month",
"role": "user"
},
{
"content": "public int getMinutesPerMonth()\n {\n return m_minutesPerMonth == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerMonth()) : ... |
[
{
"content": "Retrieve the number of minutes per year for this calendar.\n\n@return minutes per year",
"role": "user"
},
{
"content": "public int getMinutesPerYear()\n {\n return m_minutesPerYear == null ? NumberHelper.getInt(getParentFile().getProjectProperties().getMinutesPerYear()) : m_min... |
[
{
"content": "Add an empty work week.\n\n@return new work week",
"role": "user"
},
{
"content": "public ProjectCalendarWeek addWorkWeek()\n {\n ProjectCalendarWeek week = new ProjectCalendarWeek();\n week.setParent(this);\n m_workWeeks.add(week);\n m_weeksSorted = false;\n ... |
[
{
"content": "Used to add exceptions to the calendar. The MPX standard defines\na limit of 250 exceptions per calendar.\n\n@param fromDate exception start date\n@param toDate exception end date\n@return ProjectCalendarException instance",
"role": "user"
},
{
"content": "public ProjectCalendarExcepti... |
[
{
"content": "Sets the ProjectCalendar instance from which this calendar is derived.\n\n@param calendar base calendar instance",
"role": "user"
},
{
"content": "public void setParent(ProjectCalendar calendar)\n {\n // I've seen a malformed MSPDI file which sets the parent calendar to itself.\... |
[
{
"content": "Method indicating whether a day is a working or non-working day.\n\n@param day required day\n@return true if this is a working day",
"role": "user"
},
{
"content": "public boolean isWorkingDay(Day day)\n {\n DayType value = getWorkingDay(day);\n boolean result;\n\n if ... |
[
{
"content": "This method is provided to allow an absolute period of time\nrepresented by start and end dates into a duration in working\ndays based on this calendar instance. This method takes account\nof any exceptions defined for this calendar.\n\n@param startDate start of the period\n@param endDate end of t... |
[
{
"content": "Retrieves the time at which work starts on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return start time, or null for non-working day",
"role": "user"
},
{
"content": "public Date getStartTime(Date date)\n {\n Date result = m_sta... |
[
{
"content": "Retrieves the time at which work finishes on the given date, or returns\nnull if this is a non-working day.\n\n@param date Date instance\n@return finish time, or null for non-working day",
"role": "user"
},
{
"content": "public Date getFinishTime(Date date)\n {\n Date result = n... |
[
{
"content": "This method finds the start of the next working period.\n\n@param cal current Calendar instance",
"role": "user"
},
{
"content": "private void updateToNextWorkStart(Calendar cal)\n {\n Date originalDate = cal.getTime();\n\n //\n // Find the date ranges for the current ... |
[
{
"content": "Utility method to retrieve the next working date start time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of next work start",
"role": "user"
},
{
"content": "public Date getNextWorkStart(Date date)\n {\n Calendar ca... |
[
{
"content": "Utility method to retrieve the previous working date finish time, given\na date and time as a starting point.\n\n@param date date and time start point\n@return date and time of previous work finish",
"role": "user"
},
{
"content": "public Date getPreviousWorkFinish(Date date)\n {\n ... |
[
{
"content": "This method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions.\n\n@param date Date to be tested\n@return boolean value",
"role": "user"
},
{
"content": "public boolean isWorkingDate(Date date)\n {\n Calendar cal = ... |
[
{
"content": "This private method allows the caller to determine if a given date is a\nworking day. This method takes account of calendar exceptions. It assumes\nthat the caller has already calculated the day of the week on which\nthe given day falls.\n\n@param date Date to be tested\n@param day Day of the week... |
[
{
"content": "This method calculates the absolute number of days between two dates.\nNote that where two date objects are provided that fall on the same\nday, this method will return one not zero. Note also that this method\nassumes that the dates are passed in the correct order, i.e.\nstartDate < endDate.\n\n@... |
[
{
"content": "Modifier method to set the unique ID of this calendar.\n\n@param uniqueID unique identifier",
"role": "user"
},
{
"content": "@Override public void setUniqueID(Integer uniqueID)\n {\n ProjectFile parent = getParentFile();\n\n if (m_uniqueID != null)\n {\n paren... |
[
{
"content": "Sets the resource to which this calendar is linked. Note that this\nmethod updates the calendar's name to be the same as the resource name.\nIf the resource does not yet have a name, then the calendar is given\na default name.\n\n@param resource resource instance",
"role": "user"
},
{
... |
[
{
"content": "Retrieve a calendar exception which applies to this date.\n\n@param date target date\n@return calendar exception, or null if none match this date",
"role": "user"
},
{
"content": "public ProjectCalendarException getException(Date date)\n {\n ProjectCalendarException exception = ... |
[
{
"content": "Retrieve a work week which applies to this date.\n\n@param date target date\n@return work week, or null if none match this date",
"role": "user"
},
{
"content": "public ProjectCalendarWeek getWorkWeek(Date date)\n {\n ProjectCalendarWeek week = null;\n if (!m_workWeeks.isEm... |
[
{
"content": "Retrieves the amount of work on a given day, and\nreturns it in the specified format.\n\n@param date target date\n@param format required format\n@return work duration",
"role": "user"
},
{
"content": "public Duration getWork(Date date, TimeUnit format)\n {\n ProjectCalendarDateR... |
[
{
"content": "This method retrieves a Duration instance representing the amount of\nwork between two dates based on this calendar.\n\n@param startDate start date\n@param endDate end date\n@param format required duration format\n@return amount of work",
"role": "user"
},
{
"content": "public Duration... |
[
{
"content": "Utility method used to convert an integer time representation into a\nDuration instance.\n\n@param totalTime integer time representation\n@param format required time format\n@return new Duration instance",
"role": "user"
},
{
"content": "private Duration convertFormat(long totalTime, T... |
[
{
"content": "Retrieves the amount of time represented by a calendar exception\nbefore or after an intersection point.\n\n@param exception calendar exception\n@param date intersection time\n@param after true to report time after intersection, false to report time before\n@return length of time in milliseconds",... |
[
{
"content": "Retrieves the amount of working time represented by\na calendar exception.\n\n@param exception calendar exception\n@return length of time in milliseconds",
"role": "user"
},
{
"content": "private long getTotalTime(ProjectCalendarDateRanges exception)\n {\n long total = 0;\n ... |
[
{
"content": "This method calculates the total amount of working time in a single\nday, which intersects with the supplied time range.\n\n@param hours collection of working hours in a day\n@param startDate time range start\n@param endDate time range end\n@return length of time in milliseconds",
"role": "use... |
[
{
"content": "Calculates how much of a time range is before or after a\ntarget intersection point.\n\n@param start time range start\n@param end time range end\n@param target target intersection point\n@param after true if time after target required, false for time before\n@return length of time in milliseconds"... |
[
{
"content": "Retrieves the amount of time between two date time values. Note that\nthese values are converted into canonical values to remove the\ndate component.\n\n@param start start time\n@param end end time\n@return length of time",
"role": "user"
},
{
"content": "private long getTime(Date star... |
[
{
"content": "This method returns the length of overlapping time between two time\nranges.\n\n@param start1 start of first range\n@param end1 end of first range\n@param start2 start start of second range\n@param end2 end of second range\n@return overlapping time in milliseconds",
"role": "user"
},
{
... |
[
{
"content": "Copy the settings from another calendar to this calendar.\n\n@param cal calendar data source",
"role": "user"
},
{
"content": "public void copy(ProjectCalendar cal)\n {\n setName(cal.getName());\n setParent(cal.getParent());\n System.arraycopy(cal.getDays(), 0, getDays... |
[
{
"content": "Utility method to clear cached calendar data.",
"role": "user"
},
{
"content": "private void clearWorkingDateCache()\n {\n m_workingDateCache.clear();\n m_startTimeCache.clear();\n m_getDateLastResult = null;\n for (ProjectCalendar calendar : m_derivedCalendars)\n... |
[
{
"content": "Retrieves the working hours on the given date.\n\n@param date required date\n@param cal optional calendar instance\n@param day optional day instance\n@return working hours",
"role": "user"
},
{
"content": "private ProjectCalendarDateRanges getRanges(Date date, Calendar cal, Day day)\n ... |
[
{
"content": "Populate the expanded exceptions list based on the main exceptions list.\nWhere we find recurring exception definitions, we generate individual\nexceptions for each recurrence to ensure that we account for them correctly.",
"role": "user"
},
{
"content": "private void populateExpandedE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.