gpt4 book ai didi

org.jboss.as.ejb3.timerservice.schedule.attribute.Year类的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 10:27:31 26 4
gpt4 key购买 nike

本文整理了Java中org.jboss.as.ejb3.timerservice.schedule.attribute.Year类的一些代码示例,展示了Year类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Year类的具体详情如下:
包路径:org.jboss.as.ejb3.timerservice.schedule.attribute.Year
类名称:Year

Year介绍

[英]Represents in the year value part constructed out of a javax.ejb.ScheduleExpression#getYear()

A Year can hold only Integer as its value. The only exception to this being the wildcard (*) value. The various ways in which a Year value can be represented are:

  • Wildcard. For example, year = "*"
  • Range. For example, year = "2009-2011"
  • List. For example, year = "2008, 2010, 2011"
  • Single value. For example, year = "2009"
    [中]表示用javax构造的年份值部分。ejb。ScheduleExpression#getYear()
    一年的值只能是整数。唯一的例外是通配符(*)值。年值的各种表示方式包括:
    通配符。例如,year=“
    *射程。例如,year=“2009-2011”
    *名单。例如,year=“2008、2010、2011”
    *单一值。例如,year=“2009”

代码示例

代码示例来源:origin: wildfly/wildfly

this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
this.month = new Month(schedule.getMonth());
this.year = new Year(schedule.getYear());
String timezoneId = schedule.getTimezone();
if (timezoneId != null && !(timezoneId = timezoneId.trim()).isEmpty()) {

代码示例来源:origin: wildfly/wildfly

private Calendar computeNextYear(Calendar nextCal) {
  Integer nextYear = this.year.getNextMatch(nextCal);
  if (nextYear == null || nextYear > Year.MAX_YEAR) {
    return null;
  }
  int currentYear = nextCal.get(Calendar.YEAR);
  // if the current year is a match, then nothing else to
  // do. Just return back the calendar
  if (currentYear == nextYear) {
    return nextCal;
  }
  // If the next year is lesser than the current year, then
  // we have no more timeouts for the calendar expression
  if (nextYear < currentYear) {
    return null;
  }
  // at this point we have chosen a year which is greater than the current
  // year.
  // set the chosen year
  nextCal.set(Calendar.YEAR, nextYear);
  // since we are moving to a different year (as compared to the current year),
  // we should reset all other calendar attribute expressions appropriately, to their first possible
  // values
  nextCal.set(Calendar.MONTH, this.month.getFirstMatch());
  nextCal.set(Calendar.DAY_OF_MONTH, 1);
  resetTimeToFirstValues(nextCal);
  // recompute date
  nextCal = this.computeNextDate(nextCal);
  return nextCal;
}

代码示例来源:origin: stackoverflow.com

Year year = new Year();
year.setYearNo(rs.getInt("yearNo"));
year.setYear4(rs.getString("year4"));
year.setYear2(rs.getString("year2"));

代码示例来源:origin: stackoverflow.com

TimeSeries series = new TimeSeries(name);
for (int i = 0; i < 6; i++) {
  series.add(new Year(2005 + i), Math.pow(2, i) * scale);

代码示例来源:origin: org.jboss.as/jboss-as-ejb3

Integer nextYear = this.year.getNextMatch(currentCal);

代码示例来源:origin: stackoverflow.com

var year2013 = new Year("img7.jpg", "img8.jpg", "img9.jpg");

代码示例来源:origin: stackoverflow.com

ConcurrentHashMap<String, Year> concurrentMap;

final Object lock = new Object();

public void runAnalysis(final ConcurrentHashMap map) {
  /*synchronized (map) {
    //This will cause addValue() to lock up while the analysis is running
  }*/

  synchronized (lock) {
    //Now we can run a long-running analysis and not block the addValue() method

    //Additionally, if another thread calls runAnalysis(), it must wait to 
    //get our lock (when a current running analysis is completed) 
    //before it can start
  }

}

//This method needs access to concurrentMap, so we can't lock it
public void addValue() {
  concurrentMap.add("key", new Year());
}

代码示例来源:origin: stackoverflow.com

TimeSeries ts= new TimeSeries("Name of Series");
ts.addOrUpdate(new Year(2008), 42);
ts.addOrUpdate(new Year(2009), 51);
ts.addOrUpdate(new Year(2010), 97);
ts.addOrUpdate(new Year(2011), 45);

代码示例来源:origin: stackoverflow.com

public class SomeClass {
  private final Map<String, EmptyBucketInterface> strategies = new HashMap<String, EmptyBucketInterface>();

  public SomeClass() {
    strategies.put("year", new Year());
    strategies.put("quarter", new Quarter());
    strategies.put("month", new Month());
    strategies.put("week", new Week());
  }

  public void doAction(String action) {
    strategies.get(action).fnGetEmptyBuckets();
  }
}

代码示例来源:origin: stackoverflow.com

TimeTableXYDataset dataSet1 = new TimeTableXYDataset();
dataSet1.add(new Year(2001), 1.0,"Series1");
dataSet1.add(new Year(2002), 2.0,"Series1");
dataSet1.add(new Year(2003),3.0,"Series1");
dataSet1.add(new Year(2004),4.0,"Series1");
dataSet1.add(new Year(2005),5.0,"Series1");
dataSet1.add(new Year(2006),0,"Series1");
dataSet1.add(new Year(2001), 6.0,"Series2");
dataSet1.add(new Year(2002),3.0,"Series2");
dataSet1.add(new Year(2003),4.0,"Series2");
dataSet1.add(new Year(2004),3.0,"Series2");
dataSet1.add(new Year(2005),9.0,"Series2");
dataSet1.add(new Year(2006),0,"Series2");
dataSet2.add(new Year(2006),-2,"Series3");
dataSet2.add(new Year(2007),-3,"Series3");
dataSet2.add(new Year(2008),-4,"Series3");

代码示例来源:origin: stackoverflow.com

Random rand = new Random();
for (int i=0; i<(2010-1970); i++) {
  s1.add(new Year(cal.getTime()), rand.nextInt(100));
  cal.add(Calendar.YEAR, 1);

代码示例来源:origin: org.jboss.as/jboss-as-ejb3

this.dayOfMonth = new DayOfMonth(schedule.getDayOfMonth());
this.month = new Month(schedule.getMonth());
this.year = new Year(schedule.getYear());
if (schedule.getTimezone() != null && schedule.getTimezone().trim().isEmpty() == false) {

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com