本文整理了Java中org.apache.wicket.util.lang.Generics
类的一些代码示例,展示了Generics
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Generics
类的具体详情如下:
包路径:org.apache.wicket.util.lang.Generics
类名称:Generics
[英]Generics related utilities
[中]与泛型相关的实用程序
代码示例来源:origin: apache/wicket
/**
* Construct.
*/
public Url()
{
segments = Generics.newArrayList();
parameters = Generics.newArrayList();
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see java.io.ObjectOutputStream.PutField#put(java.lang.String, boolean)
*/
@Override
public void put(String name, boolean val)
{
if (mapBoolean == null)
{
mapBoolean = Generics.newHashMap(4);
}
mapBoolean.put(name, val ? Boolean.TRUE : Boolean.FALSE);
}
代码示例来源:origin: org.apache.wicket/wicket-core
/**
* @return iterator over item instances that exist as children of this view
*/
public Iterator<Item<T>> getItems()
{
return Generics.iterator(iterator());
}
代码示例来源:origin: apache/wicket
if (connectionsBySession == null)
connectionsBySession = Generics.newConcurrentHashMap();
application.setMetaData(KEY, connectionsBySession);
if (connectionsByPage == null)
connectionsByPage = Generics.newConcurrentHashMap();
ConcurrentMap<IKey, IWebSocketConnection> old = connectionsBySession.putIfAbsent(sessionId, connectionsByPage);
if (old != null)
代码示例来源:origin: theonedev/onedev
if (connectionsBySession == null)
connectionsBySession = Generics.newConcurrentHashMap();
application.setMetaData(KEY, connectionsBySession);
if (connectionsByPage == null)
connectionsByPage = Generics.newConcurrentHashMap();
ConcurrentMap<IKey, IWebSocketConnection> old = connectionsBySession.putIfAbsent(sessionId, connectionsByPage);
if (old != null)
代码示例来源:origin: sebfz1/wicket-jquery-ui
/**
* Constructor
*
* @param title IModel that represents the title of the menu-item
* @param pageUrl the url of the page to redirect to when menu-item is clicked
* @param openInNewWindow whether the page is opened in a new window
*/
public SfMenuItem(IModel<String> title, String pageUrl, boolean openInNewWindow)
{
super(title, pageUrl, openInNewWindow);
this.items = Generics.newArrayList();
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see java.io.ObjectOutputStream.PutField#put(java.lang.String, java.lang.Object)
*/
@Override
public void put(String name, Object val)
{
if (mapObject == null)
{
mapObject = Generics.newHashMap(4);
}
mapObject.put(name, val);
}
代码示例来源:origin: apache/wicket
/**
* @return iterator over item instances that exist as children of this view
*/
public Iterator<Item<T>> getItems()
{
return Generics.iterator(iterator());
}
代码示例来源:origin: org.apache.wicket/wicket-native-websocket-core
if (connectionsBySession == null)
connectionsBySession = Generics.newConcurrentHashMap();
application.setMetaData(KEY, connectionsBySession);
if (connectionsByPage == null)
connectionsByPage = Generics.newConcurrentHashMap();
ConcurrentMap<IKey, IWebSocketConnection> old = connectionsBySession.putIfAbsent(sessionId, connectionsByPage);
if (old != null)
代码示例来源:origin: org.apache.wicket/wicket-core
protected AbstractObjectChecker()
{
this(Generics.<Class<?>>newArrayList());
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see java.io.ObjectOutputStream.PutField#put(java.lang.String, float)
*/
@Override
public void put(String name, float val)
{
if (mapFloat == null)
{
mapFloat = Generics.newHashMap(4);
}
mapFloat.put(name, new Float(val));
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @return iterator over item instances that exist as children of this view
*/
public Iterator<Item<T>> getItems()
{
return Generics.iterator(iterator());
}
代码示例来源:origin: org.apache.wicket/wicket-core
@Override
public ResourceReference.UrlAttributes getUrlAttributes()
{
Locale locale = getCurrentLocale();
String style = getCurrentStyle();
String variation = getVariation();
ResourceReference.UrlAttributes key = new ResourceReference.UrlAttributes(locale, style,
variation);
if (urlAttributesCacheMap == null)
{
urlAttributesCacheMap = Generics.newConcurrentHashMap();
}
ResourceReference.UrlAttributes value = urlAttributesCacheMap.get(key);
if (value == null)
{
value = getUrlAttributes(locale, style, variation);
UrlAttributes tmpValue = urlAttributesCacheMap.putIfAbsent(key, value);
if (tmpValue != null)
{
value = tmpValue;
}
}
return value;
}
代码示例来源:origin: com.googlecode.wicket-jquery-ui/wicket-jquery-ui-core
@Override
public List<String> getTextProperties()
{
return Generics.newArrayList();
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see java.io.ObjectOutputStream.PutField#put(java.lang.String, byte)
*/
@Override
public void put(String name, byte val)
{
if (mapBytes == null)
{
mapBytes = Generics.newHashMap(4);
}
mapBytes.put(name, new Byte(val));
}
代码示例来源:origin: maciejmiklas/cyclop
private void findNext() {
next = null;
if (cells != null && cells.hasNext()) {
next = cells.next();
} else {
while (rows.hasNext()) {
MarkupContainer row = rows.next();
final Iterator<? extends Component> rawCells;
rawCells = ((MarkupContainer) row.iterator().next()).iterator();
cells = Generics.iterator(rawCells);
if (cells.hasNext()) {
next = cells.next();
break;
}
}
}
}
代码示例来源:origin: apache/wicket
@Override
public ResourceReference.UrlAttributes getUrlAttributes()
{
Locale locale = getCurrentLocale();
String style = getCurrentStyle();
String variation = getVariation();
ResourceReference.UrlAttributes key = new ResourceReference.UrlAttributes(locale, style,
variation);
if (urlAttributesCacheMap == null)
{
urlAttributesCacheMap = Generics.newConcurrentHashMap();
}
ResourceReference.UrlAttributes value = urlAttributesCacheMap.get(key);
if (value == null)
{
value = getUrlAttributes(locale, style, variation);
UrlAttributes tmpValue = urlAttributesCacheMap.putIfAbsent(key, value);
if (tmpValue != null)
{
value = tmpValue;
}
}
return value;
}
代码示例来源:origin: org.apache.wicket/wicket-request
/**
* Construct.
*/
public Url()
{
segments = Generics.newArrayList();
parameters = Generics.newArrayList();
}
代码示例来源:origin: org.ops4j.pax.wicket/pax-wicket-service
/**
* @see java.io.ObjectOutputStream.PutField#put(java.lang.String, char)
*/
@Override
public void put(String name, char val)
{
if (mapChar == null)
{
mapChar = Generics.newHashMap(4);
}
mapChar.put(name, new Character(val));
}
代码示例来源:origin: apache/wicket
private void findNext()
{
next = null;
if (cells != null && cells.hasNext())
{
next = cells.next();
}
else
{
while (rows.hasNext())
{
MarkupContainer row = rows.next();
final Iterator<? extends Component> rawCells;
rawCells = ((MarkupContainer)row.iterator().next()).iterator();
cells = Generics.iterator(rawCells);
if (cells.hasNext())
{
next = cells.next();
break;
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!