repo_name
stringlengths
7
104
file_path
stringlengths
13
198
context
stringlengths
67
7.15k
import_statement
stringlengths
16
4.43k
code
stringlengths
40
6.98k
prompt
stringlengths
227
8.27k
next_line
stringlengths
8
795
mayanhui/ella
src/main/java/com/adintellig/ella/hbase/handler/JMXHMasterHandler.java
// Path: src/main/java/com/adintellig/ella/model/jmxbeans/LiveRegionServerBeans.java // public class LiveRegionServerBeans { // private LiveRegionServerBean[] beans; // // public LiveRegionServerBean[] getBeans() { // return beans; // } // // public void setBeans(LiveRegionServerBean[] beans) { // this.beans ...
import java.io.IOException; import java.sql.SQLException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.adintellig.ella.model.jmxbeans.LiveRegionServerBeans; import com.adintellig.ella.util.Config...
package com.adintellig.ella.hbase.handler; public class JMXHMasterHandler extends ServerHandler{ private static Logger logger = LoggerFactory .getLogger(JMXHMasterHandler.class);
// Path: src/main/java/com/adintellig/ella/model/jmxbeans/LiveRegionServerBeans.java // public class LiveRegionServerBeans { // private LiveRegionServerBean[] beans; // // public LiveRegionServerBean[] getBeans() { // return beans; // } // // public void setBeans(LiveRegionServerBean[] beans) { // this.beans ...
static ConfigProperties config = ConfigFactory.getInstance()
mayanhui/ella
src/main/java/com/adintellig/ella/hbase/handler/JMXHMasterHandler.java
// Path: src/main/java/com/adintellig/ella/model/jmxbeans/LiveRegionServerBeans.java // public class LiveRegionServerBeans { // private LiveRegionServerBean[] beans; // // public LiveRegionServerBean[] getBeans() { // return beans; // } // // public void setBeans(LiveRegionServerBean[] beans) { // this.beans ...
import java.io.IOException; import java.sql.SQLException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.adintellig.ella.model.jmxbeans.LiveRegionServerBeans; import com.adintellig.ella.util.Config...
package com.adintellig.ella.hbase.handler; public class JMXHMasterHandler extends ServerHandler{ private static Logger logger = LoggerFactory .getLogger(JMXHMasterHandler.class);
// Path: src/main/java/com/adintellig/ella/model/jmxbeans/LiveRegionServerBeans.java // public class LiveRegionServerBeans { // private LiveRegionServerBean[] beans; // // public LiveRegionServerBean[] getBeans() { // return beans; // } // // public void setBeans(LiveRegionServerBean[] beans) { // this.beans ...
static ConfigProperties config = ConfigFactory.getInstance()
mayanhui/ella
src/main/java/com/adintellig/ella/hbase/handler/JMXHMasterHandler.java
// Path: src/main/java/com/adintellig/ella/model/jmxbeans/LiveRegionServerBeans.java // public class LiveRegionServerBeans { // private LiveRegionServerBean[] beans; // // public LiveRegionServerBean[] getBeans() { // return beans; // } // // public void setBeans(LiveRegionServerBean[] beans) { // this.beans ...
import java.io.IOException; import java.sql.SQLException; import org.codehaus.jackson.JsonParseException; import org.codehaus.jackson.map.JsonMappingException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.adintellig.ella.model.jmxbeans.LiveRegionServerBeans; import com.adintellig.ella.util.Config...
package com.adintellig.ella.hbase.handler; public class JMXHMasterHandler extends ServerHandler{ private static Logger logger = LoggerFactory .getLogger(JMXHMasterHandler.class); static ConfigProperties config = ConfigFactory.getInstance() .getConfigProperties(ConfigFactory.ELLA_CONFIG_PATH); public stat...
// Path: src/main/java/com/adintellig/ella/model/jmxbeans/LiveRegionServerBeans.java // public class LiveRegionServerBeans { // private LiveRegionServerBean[] beans; // // public LiveRegionServerBean[] getBeans() { // return beans; // } // // public void setBeans(LiveRegionServerBean[] beans) { // this.beans ...
public LiveRegionServerBeans parseBean(String jsonString) {
mayanhui/ella
src/main/java/com/adintellig/ella/action/LoginServlet.java
// Path: src/main/java/com/adintellig/ella/dao/UserDaoImpl.java // public class UserDaoImpl { // private static Logger logger = LoggerFactory.getLogger(UserDaoImpl.class); // // public User findByNameAndPassword(String username, String password) // throws SQLException { // String sql = "select * from hbase.user...
import java.io.IOException; import java.sql.SQLException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.s...
package com.adintellig.ella.action; public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L; private static Logger logger = LoggerFactory.getLogger(LoginServlet.class);
// Path: src/main/java/com/adintellig/ella/dao/UserDaoImpl.java // public class UserDaoImpl { // private static Logger logger = LoggerFactory.getLogger(UserDaoImpl.class); // // public User findByNameAndPassword(String username, String password) // throws SQLException { // String sql = "select * from hbase.user...
UserDaoImpl dao = new UserDaoImpl();
mayanhui/ella
src/main/java/com/adintellig/ella/action/LoginServlet.java
// Path: src/main/java/com/adintellig/ella/dao/UserDaoImpl.java // public class UserDaoImpl { // private static Logger logger = LoggerFactory.getLogger(UserDaoImpl.class); // // public User findByNameAndPassword(String username, String password) // throws SQLException { // String sql = "select * from hbase.user...
import java.io.IOException; import java.sql.SQLException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.s...
package com.adintellig.ella.action; public class LoginServlet extends HttpServlet { private static final long serialVersionUID = 1L; private static Logger logger = LoggerFactory.getLogger(LoginServlet.class); UserDaoImpl dao = new UserDaoImpl(); @Override public void init() throws ServletException { } p...
// Path: src/main/java/com/adintellig/ella/dao/UserDaoImpl.java // public class UserDaoImpl { // private static Logger logger = LoggerFactory.getLogger(UserDaoImpl.class); // // public User findByNameAndPassword(String username, String password) // throws SQLException { // String sql = "select * from hbase.user...
User u = dao.findByNameAndPassword(username, password);
mayanhui/ella
src/main/java/com/adintellig/ella/dao/ServerDaoImpl.java
// Path: src/main/java/com/adintellig/ella/model/Server.java // public class Server { // private String host; // private Timestamp updateTime; // // public String getHost() { // return host; // } // // public void setHost(String host) { // this.host = host; // } // // public Timestamp getUpdateTime() { //...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.adintellig.ella.model.Server; import com.adintellig.el...
package com.adintellig.ella.dao; public class ServerDaoImpl { private static Logger logger = LoggerFactory.getLogger(ServerDaoImpl.class); static final String insertSQL = "INSERT INTO hbase.servers(host, update_time) " + "VALUES(?, ?)";
// Path: src/main/java/com/adintellig/ella/model/Server.java // public class Server { // private String host; // private Timestamp updateTime; // // public String getHost() { // return host; // } // // public void setHost(String host) { // this.host = host; // } // // public Timestamp getUpdateTime() { //...
public void batchUpdate(List<Server> beans) throws Exception {
mayanhui/ella
src/main/java/com/adintellig/ella/dao/ServerDaoImpl.java
// Path: src/main/java/com/adintellig/ella/model/Server.java // public class Server { // private String host; // private Timestamp updateTime; // // public String getHost() { // return host; // } // // public void setHost(String host) { // this.host = host; // } // // public Timestamp getUpdateTime() { //...
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.adintellig.ella.model.Server; import com.adintellig.el...
package com.adintellig.ella.dao; public class ServerDaoImpl { private static Logger logger = LoggerFactory.getLogger(ServerDaoImpl.class); static final String insertSQL = "INSERT INTO hbase.servers(host, update_time) " + "VALUES(?, ?)"; public void batchUpdate(List<Server> beans) throws Exception {
// Path: src/main/java/com/adintellig/ella/model/Server.java // public class Server { // private String host; // private Timestamp updateTime; // // public String getHost() { // return host; // } // // public void setHost(String host) { // this.host = host; // } // // public Timestamp getUpdateTime() { //...
Connection con = JdbcUtil.getConnection();
mayanhui/ella
src/main/java/com/adintellig/ella/service/quartz/CronQuartzJob.java
// Path: src/main/java/com/adintellig/ella/hbase/handler/JMXHandler.java // public class JMXHandler extends Thread { // private static Logger logger = LoggerFactory.getLogger(JMXHandler.class); // // private static JMXHandler service; // // private RequestCountDaoImpl reqDao = null; // private TableDaoImpl tblDao...
import org.quartz.Job; import org.quartz.JobExecutionContext; import org.quartz.JobExecutionException; import com.adintellig.ella.hbase.handler.JMXHandler;
package com.adintellig.ella.service.quartz; public class CronQuartzJob implements Job { public CronQuartzJob() { } @Override public void execute(JobExecutionContext context) throws JobExecutionException {
// Path: src/main/java/com/adintellig/ella/hbase/handler/JMXHandler.java // public class JMXHandler extends Thread { // private static Logger logger = LoggerFactory.getLogger(JMXHandler.class); // // private static JMXHandler service; // // private RequestCountDaoImpl reqDao = null; // private TableDaoImpl tblDao...
JMXHandler service = JMXHandler.getInstance();
mayanhui/ella
src/main/java/com/adintellig/ella/util/RequestCountUtil.java
// Path: src/main/java/com/adintellig/ella/model/RequestCount.java // public class RequestCount { // private long writeCount = 0l; // private long readCount = 0l; // private long totalCount = 0l; // private Timestamp updateTime = null; // private Timestamp insertTime = null; // private int writeTps = 0; // priva...
import java.util.List; import com.adintellig.ella.model.RequestCount;
package com.adintellig.ella.util; public class RequestCountUtil { public static final String WRITE = "WRITE"; public static final String READ = "READ"; public static final String TOTAL = "TOTAL";
// Path: src/main/java/com/adintellig/ella/model/RequestCount.java // public class RequestCount { // private long writeCount = 0l; // private long readCount = 0l; // private long totalCount = 0l; // private Timestamp updateTime = null; // private Timestamp insertTime = null; // private int writeTps = 0; // priva...
public static int sumTps(List<RequestCount> tables, String type) {
spearal/spearal-java
src/main/java/org/spearal/impl/coder/BeanCoder.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
import java.io.IOException; import org.spearal.configuration.CoderProvider; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
public void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException {
spearal/spearal-java
src/main/java/org/spearal/Spearal.java
// Path: src/main/java/org/spearal/configuration/PartialObjectFactory.java // public interface PartialObjectProxy { // // boolean $hasUndefinedProperties(); // boolean $isDefined(String propertyName); // boolean $undefine(String propertyName); // Property[] $getDefinedProperties(); // }
import org.spearal.configuration.PartialObjectFactory.PartialObjectProxy;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/PartialObjectFactory.java // public interface PartialObjectProxy { // // boolean $hasUndefinedProperties(); // boolean $isDefined(String propertyName); // boolean $undefine(String propertyName); // Property[] $getDefinedProperties(); // } // Path: src/main/java/or...
if (!(object instanceof PartialObjectProxy))
spearal/spearal-java
src/main/java/org/spearal/impl/property/StringProperty.java
// Path: src/main/java/org/spearal/impl/ExtendedSpearalEncoder.java // public interface ExtendedSpearalEncoder extends SpearalEncoder { // // void writeNull() throws IOException; // // void writeBoolean(boolean value) throws IOException; // // void writeDateTime(SpearalDateTime value) throws IOException; // //...
import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/impl/ExtendedSpearalEncoder.java // public interface ExtendedSpearalEncoder extends SpearalEncoder { // // void writeNull() throws IOException; // // void writeBoolean(boolean value) throws IOException; // // void writeDateTime(SpearalDateTime value) throws IOException; // //...
public void write(ExtendedSpearalEncoder encoder, Object holder)
spearal/spearal-java
src/main/java/org/spearal/impl/coder/CollectionCoder.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
import java.io.IOException; import java.util.Collection; import org.spearal.configuration.CoderProvider; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
public void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException {
spearal/spearal-java
src/main/java/org/spearal/impl/security/SecurizerImpl.java
// Path: src/main/java/org/spearal/configuration/Securizer.java // public interface Securizer extends Configurable { // // void checkDecodable(Type type) throws SecurityException; // void checkEncodable(Class<?> cls) throws SecurityException; // } // // Path: src/main/java/org/spearal/impl/util/TypeUtil.java // pub...
import java.io.Serializable; import java.lang.reflect.Type; import org.spearal.configuration.Securizer; import org.spearal.impl.util.TypeUtil;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/Securizer.java // public interface Securizer extends Configurable { // // void checkDecodable(Type type) throws SecurityException; // void checkEncodable(Class<?> cls) throws SecurityException; // } // // Path: src/main/java/org/spearal/impl/util/TypeUtil.java // pub...
if (!Serializable.class.isAssignableFrom(TypeUtil.classOfType(type)))
spearal/spearal-java
src/main/java/org/spearal/impl/instantiator/ProxyInstantiator.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.configuration.PropertyInstantiatorProvider.PropertyInstantiator; import org.spearal.configuration.TypeInstantiatorProvider; import org.spearal.configuration.TypeInstantiatorProvider.TypeInstantiator; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.re...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
PropertyInstantiatorProvider, PropertyInstantiator {
spearal/spearal-java
src/main/java/org/spearal/impl/instantiator/ProxyInstantiator.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.configuration.PropertyInstantiatorProvider.PropertyInstantiator; import org.spearal.configuration.TypeInstantiatorProvider; import org.spearal.configuration.TypeInstantiatorProvider.TypeInstantiator; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.re...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
PropertyInstantiatorProvider, PropertyInstantiator {
spearal/spearal-java
src/main/java/org/spearal/impl/instantiator/ProxyInstantiator.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.configuration.PropertyInstantiatorProvider.PropertyInstantiator; import org.spearal.configuration.TypeInstantiatorProvider; import org.spearal.configuration.TypeInstantiatorProvider.TypeInstantiator; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.re...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public Object instantiate(SpearalContext context, Type type, Object param) {
spearal/spearal-java
src/main/java/org/spearal/impl/instantiator/ProxyInstantiator.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.configuration.PropertyInstantiatorProvider.PropertyInstantiator; import org.spearal.configuration.TypeInstantiatorProvider; import org.spearal.configuration.TypeInstantiatorProvider.TypeInstantiator; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.re...
private final Property[] properties; private Map<String, Property> definedProperties = new HashMap<String, Property>(); public PropertiesInvocationHandler(SpearalContext context, Property[] properties) { this(context, properties, null); } public PropertiesInvocationHandler(SpearalContext context, Pro...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
if (method.getDeclaringClass() == PartialObjectProxy.class) {
spearal/spearal-java
src/main/java/org/spearal/impl/instantiator/ProxyInstantiator.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.configuration.PropertyInstantiatorProvider.PropertyInstantiator; import org.spearal.configuration.TypeInstantiatorProvider; import org.spearal.configuration.TypeInstantiatorProvider.TypeInstantiator; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationHandler; import java.lang.re...
if (values.containsKey(args[0])) return true; if (definedProperties.containsKey(args[0])) return true; return false; } else if ("$undefine".equals(method.getName()) && method.getParameterTypes().length == 1 && method.getParameterTypes()[0] == String.class) { values.remove(a...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
throw new UndefinedPropertyException(method.toString());
spearal/spearal-java
src/test/java/org/spearal/test/TestCollection.java
// Path: src/test/java/org/spearal/test/model/SimpleBean.java // public class SimpleBean implements Serializable { // // private static final long serialVersionUID = 1L; // // private boolean booleanValue; // private int intValue; // private double doubleValue; // private String stringValue; // // // public ...
import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Random; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.spearal.test.model.SimpleBean;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/test/java/org/spearal/test/model/SimpleBean.java // public class SimpleBean implements Serializable { // // private static final long serialVersionUID = 1L; // // private boolean booleanValue; // private int intValue; // private double doubleValue; // private String stringValue; // // // public ...
new SimpleBean(true, 3, -0.1, "abc"),
spearal/spearal-java
src/main/java/org/spearal/impl/coder/ArrayCoder.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
import java.io.IOException; import org.spearal.configuration.CoderProvider; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
public void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException {
spearal/spearal-java
src/main/java/org/spearal/impl/SpearalPropertyFilterImpl.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.spearal.SpearalContext; import org.spearal.SpearalPropertyFilter; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
private final Map<Class<?>, Property[]> propertiesMap;
spearal/spearal-java
src/main/java/org/spearal/configuration/TypeInstantiatorProvider.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import java.lang.reflect.Type; import org.spearal.SpearalContext;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
Object instantiate(SpearalContext context, Type type, Object param);
spearal/spearal-java
src/main/java/org/spearal/impl/cache/AnyMap.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
V putIfAbsent(SpearalContext context, K key);
spearal/spearal-java
src/main/java/org/spearal/SpearalDecoder.java
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
import java.io.IOException; import java.lang.reflect.Type; import java.util.Collection; import java.util.List; import java.util.Map; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
public Property getProperty();
spearal/spearal-java
src/main/java/org/spearal/impl/ExtendedSpearalDecoder.java
// Path: src/main/java/org/spearal/SpearalDecoder.java // public interface SpearalDecoder { // // public interface Path { // // Collection<PathSegment> segments(); // } // // public interface PathSegment { // // PathSegment copy(); // } // // public interface CollectionPathSegment extends PathSegmen...
import java.io.IOException; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Type; import java.math.BigDecimal; import java.math.BigInteger; import java.util.Map; import org.spearal.SpearalDecoder; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalDecoder.java // public interface SpearalDecoder { // // public interface Path { // // Collection<PathSegment> segments(); // } // // public interface PathSegment { // // PathSegment copy(); // } // // public interface CollectionPathSegment extends PathSegmen...
void readCollection(int parameterizedType, Object holder, Property property)
spearal/spearal-java
src/test/java/org/spearal/test/TestSpearalType.java
// Path: src/main/java/org/spearal/impl/SpearalType.java // public enum SpearalType { // // // No parameters (0x00...0x0f). // // NULL(0x00), // // TRUE(0x01), // FALSE(0x02), // // // 4 bits of parameters (0x10...0xf0). // // INTEGRAL(0x10), // BIG_INTEGRAL(0x20), // // FLOATING(0x30), // BIG_FLOATIN...
import org.junit.Assert; import org.junit.Test; import org.spearal.impl.SpearalType;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/impl/SpearalType.java // public enum SpearalType { // // // No parameters (0x00...0x0f). // // NULL(0x00), // // TRUE(0x01), // FALSE(0x02), // // // 4 bits of parameters (0x10...0xf0). // // INTEGRAL(0x10), // BIG_INTEGRAL(0x20), // // FLOATING(0x30), // BIG_FLOATIN...
SpearalType.valueOf(parameterizedType);
spearal/spearal-java
src/main/java/org/spearal/impl/coder/EnumCoder.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
import java.io.IOException; import org.spearal.configuration.CoderProvider; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
public void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException {
spearal/spearal-java
src/main/java/org/spearal/SpearalContext.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.configuration.Configurable; import org.spearal.configuration.FilteredBeanDescriptorFactory.FilteredBeanDescriptor; import org.spearal.configuration.Pro...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
Securizer getSecurizer();
spearal/spearal-java
src/main/java/org/spearal/SpearalContext.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.configuration.Configurable; import org.spearal.configuration.FilteredBeanDescriptorFactory.FilteredBeanDescriptor; import org.spearal.configuration.Pro...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
Property[] getProperties(Class<?> cls);
spearal/spearal-java
src/main/java/org/spearal/SpearalContext.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.configuration.Configurable; import org.spearal.configuration.FilteredBeanDescriptorFactory.FilteredBeanDescriptor; import org.spearal.configuration.Pro...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
Coder getCoder(Class<?> valueClass);
spearal/spearal-java
src/main/java/org/spearal/SpearalContext.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.configuration.Configurable; import org.spearal.configuration.FilteredBeanDescriptorFactory.FilteredBeanDescriptor; import org.spearal.configuration.Pro...
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Path: src/main/java/org/spearal/configuration/Configurable.java // public interface Configurable { // // } // // Path: src...
FilteredBeanDescriptor createDescriptor(SpearalPropertyFilter filter, Object value);
spearal/spearal-java
src/main/java/org/spearal/impl/cache/DualIdentityMap.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public V putIfAbsent(SpearalContext context, K1 key1, K2 key2) {
spearal/spearal-java
src/test/java/org/spearal/test/TestEnum.java
// Path: src/test/java/org/spearal/test/model/SimpleEnum.java // public enum SimpleEnum { // A, // BC, // DEF, // GHIJ, // KLMNOPQRSTUVWXYZ // }
import java.io.IOException; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.spearal.test.model.SimpleEnum;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/test/java/org/spearal/test/model/SimpleEnum.java // public enum SimpleEnum { // A, // BC, // DEF, // GHIJ, // KLMNOPQRSTUVWXYZ // } // Path: src/test/java/org/spearal/test/TestEnum.java import java.io.IOException; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.j...
int length = SimpleEnum.class.getName().length();
spearal/spearal-java
src/main/java/org/spearal/SpearalPropertyFilter.java
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
Property[] get(Class<?> cls);
spearal/spearal-java
src/main/java/org/spearal/configuration/ConverterProvider.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import java.lang.reflect.Type; import org.spearal.SpearalContext;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
T convert(SpearalContext context, Object value, Type targetType);
spearal/spearal-java
src/main/java/org/spearal/impl/cache/CopyOnWriteDualIdentityMap.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public synchronized V putIfAbsent(SpearalContext context, K1 key1, K2 key2) {
spearal/spearal-java
src/main/java/org/spearal/configuration/FilteredBeanDescriptorFactory.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.SpearalPropertyFilter; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
Property[] getProperties();
spearal/spearal-java
src/main/java/org/spearal/configuration/FilteredBeanDescriptorFactory.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.SpearalPropertyFilter; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
FilteredBeanDescriptor createDescription(SpearalContext context, SpearalPropertyFilter filter, Object value);
spearal/spearal-java
src/main/java/org/spearal/configuration/FilteredBeanDescriptorFactory.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.SpearalPropertyFilter; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
FilteredBeanDescriptor createDescription(SpearalContext context, SpearalPropertyFilter filter, Object value);
spearal/spearal-java
src/main/java/org/spearal/impl/cache/EqualityMap.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public V putIfAbsent(SpearalContext context, K key) {
spearal/spearal-java
src/test/java/org/spearal/test/TestMap.java
// Path: src/test/java/org/spearal/test/model/SimpleBean.java // public class SimpleBean implements Serializable { // // private static final long serialVersionUID = 1L; // // private boolean booleanValue; // private int intValue; // private double doubleValue; // private String stringValue; // // // public ...
import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Random; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.spearal.test.model.SimpleBean;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/test/java/org/spearal/test/model/SimpleBean.java // public class SimpleBean implements Serializable { // // private static final long serialVersionUID = 1L; // // private boolean booleanValue; // private int intValue; // private double doubleValue; // private String stringValue; // // // public ...
Map<String, SimpleBean> map = new HashMap<String, SimpleBean>();
spearal/spearal-java
src/main/java/org/spearal/impl/property/AnyProperty.java
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.configuration.PropertyFactory.Property; import org.spearal.impl.ExtendedSpearalDecode...
public Field getField() { return field; } @Override public boolean hasGetter() { return getter != null; } @Override public Method getGetter() { return getter; } @Override public boolean hasSetter() { return setter != null; } @Override public Method getSetter() { return setter; } @Override ...
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
public Object init(ExtendedSpearalDecoder decoder, Object holder)
spearal/spearal-java
src/main/java/org/spearal/impl/property/AnyProperty.java
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.configuration.PropertyFactory.Property; import org.spearal.impl.ExtendedSpearalDecode...
if (field != null) field.set(holder, value); else if (setter != null) setter.invoke(holder, value); } @Override public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass) { return getAnnotation(annotationClass) != null; } @Override public <A extends Annotation> A getAnnotatio...
// Path: src/main/java/org/spearal/configuration/PropertyFactory.java // public interface Property { // // String getName(); // Class<?> getType(); // Type getGenericType(); // // boolean hasField(); // Field getField(); // boolean hasGetter(); // Method getGetter(); // boolean hasSetter(); // Method get...
public void write(ExtendedSpearalEncoder encoder, Object holder)
spearal/spearal-java
src/main/java/org/spearal/impl/cache/IdentityMap.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public V putIfAbsent(SpearalContext context, K key) {
spearal/spearal-java
src/test/java/org/spearal/test/TestProxy.java
// Path: src/test/java/org/spearal/test/model/Nameable.java // public interface Nameable { // // String getFirstName(); // void setFirstName(String value); // // String getLastName(); // void setLastName(String value); // }
import java.io.IOException; import java.io.Serializable; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.spearal.test.model.Nameable;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/test/java/org/spearal/test/model/Nameable.java // public interface Nameable { // // String getFirstName(); // void setFirstName(String value); // // String getLastName(); // void setLastName(String value); // } // Path: src/test/java/org/spearal/test/TestProxy.java import java.io.IOException; impo...
new Class<?>[]{ Nameable.class, Serializable.class },
spearal/spearal-java
src/main/java/org/spearal/impl/util/ClassDescriptionUtil.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import java.lang.reflect.Proxy; import org.spearal.SpearalContext; import org.spearal.configuration.PartialObjectFactory.PartialObjectProxy; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public static String createAliasedDescription(SpearalContext context, Class<?> cls, Property[] properties) {
spearal/spearal-java
src/main/java/org/spearal/impl/util/ClassDescriptionUtil.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import java.lang.reflect.Proxy; import org.spearal.SpearalContext; import org.spearal.configuration.PartialObjectFactory.PartialObjectProxy; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public static String createAliasedDescription(SpearalContext context, Class<?> cls, Property[] properties) {
spearal/spearal-java
src/main/java/org/spearal/impl/util/ClassDescriptionUtil.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import java.lang.reflect.Proxy; import org.spearal.SpearalContext; import org.spearal.configuration.PartialObjectFactory.PartialObjectProxy; import org.spearal.configuration.PropertyFactory.Property;
public static String[] splitPropertyNames(String description) { int iSharp = description.indexOf('#'); if (iSharp == -1) return new String[0]; return split(description, iSharp + 1, description.length()); } public static int propertiesCount(String description) { int iSharp = description.indexOf('#'); ...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
if (PartialObjectProxy.class.isAssignableFrom(interfaces[i]))
spearal/spearal-java
src/main/java/org/spearal/impl/coder/MapCoder.java
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
import java.io.IOException; import java.util.Map; import org.spearal.configuration.CoderProvider; import org.spearal.configuration.CoderProvider.Coder; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/configuration/CoderProvider.java // public interface CoderProvider extends Repeatable { // // public interface Coder { // // void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException; // } // // Coder getCoder(Class<?> valueClass); // } // // Path: src/m...
public void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException {
spearal/spearal-java
src/main/java/org/spearal/impl/cache/CopyOnWriteMap.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.impl.cache.AnyMap.ValueProvider;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public CopyOnWriteMap(boolean identity, ValueProvider<K, P, V> provider) {
spearal/spearal-java
src/main/java/org/spearal/impl/cache/CopyOnWriteMap.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.impl.cache.AnyMap.ValueProvider;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
public synchronized V putIfAbsent(SpearalContext context, K key, P param) {
spearal/spearal-java
src/main/java/org/spearal/configuration/CoderProvider.java
// Path: src/main/java/org/spearal/impl/ExtendedSpearalEncoder.java // public interface ExtendedSpearalEncoder extends SpearalEncoder { // // void writeNull() throws IOException; // // void writeBoolean(boolean value) throws IOException; // // void writeDateTime(SpearalDateTime value) throws IOException; // //...
import java.io.IOException; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/impl/ExtendedSpearalEncoder.java // public interface ExtendedSpearalEncoder extends SpearalEncoder { // // void writeNull() throws IOException; // // void writeBoolean(boolean value) throws IOException; // // void writeDateTime(SpearalDateTime value) throws IOException; // //...
void encode(ExtendedSpearalEncoder encoder, Object value) throws IOException;
spearal/spearal-java
src/main/java/org/spearal/configuration/PropertyFactory.java
// Path: src/main/java/org/spearal/impl/ExtendedSpearalDecoder.java // public interface ExtendedSpearalDecoder extends SpearalDecoder { // // Object readAny(int parameterizedType) throws IOException; // Object readAny(int parameterizedType, Type targetType) throws IOException; // void skipAny(int parameterizedType)...
import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.impl.ExtendedSpearalDecoder; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/impl/ExtendedSpearalDecoder.java // public interface ExtendedSpearalDecoder extends SpearalDecoder { // // Object readAny(int parameterizedType) throws IOException; // Object readAny(int parameterizedType, Type targetType) throws IOException; // void skipAny(int parameterizedType)...
Object init(ExtendedSpearalDecoder decoder, Object holder)
spearal/spearal-java
src/main/java/org/spearal/configuration/PropertyFactory.java
// Path: src/main/java/org/spearal/impl/ExtendedSpearalDecoder.java // public interface ExtendedSpearalDecoder extends SpearalDecoder { // // Object readAny(int parameterizedType) throws IOException; // Object readAny(int parameterizedType, Type targetType) throws IOException; // void skipAny(int parameterizedType)...
import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Type; import org.spearal.impl.ExtendedSpearalDecoder; import org.spearal.impl.ExtendedSpearalEncoder;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/impl/ExtendedSpearalDecoder.java // public interface ExtendedSpearalDecoder extends SpearalDecoder { // // Object readAny(int parameterizedType) throws IOException; // Object readAny(int parameterizedType, Type targetType) throws IOException; // void skipAny(int parameterizedType)...
public void write(ExtendedSpearalEncoder encoder, Object holder)
spearal/spearal-java
src/main/java/org/spearal/configuration/PropertyInstantiatorProvider.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
Object instantiate(SpearalContext context, Property property, Object param);
spearal/spearal-java
src/main/java/org/spearal/configuration/PropertyInstantiatorProvider.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
Object instantiate(SpearalContext context, Property property, Object param);
spearal/spearal-java
src/main/java/org/spearal/configuration/PartialObjectFactory.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
Property[] $getDefinedProperties();
spearal/spearal-java
src/main/java/org/spearal/configuration/PartialObjectFactory.java
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
import org.spearal.SpearalContext; import org.spearal.configuration.PropertyFactory.Property;
/** * == @Spearal ==> * * Copyright (C) 2014 Franck WOLFF & William DRAI (http://www.spearal.io) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/...
// Path: src/main/java/org/spearal/SpearalContext.java // public interface SpearalContext { // // void configure(Configurable configurable); // void configure(Configurable configurable, boolean append); // // Securizer getSecurizer(); // // String alias(Class<?> cls); // String unalias(String aliasedClassName...
Object instantiatePartial(SpearalContext context, Class<?> cls, Property[] partialProperties)
CPPAlien/DaVinci
davinci/src/main/java/cn/hadcn/davinci/image/cache/DiskLruCache.java
// Path: davinci/src/main/java/cn/hadcn/davinci/image/base/Util.java // public final class Util { // public static final Charset US_ASCII = Charset.forName("US-ASCII"); // public static final Charset UTF_8 = Charset.forName("UTF-8"); // // private Util() { // } // // public static String readFully...
import java.io.BufferedWriter; import java.io.Closeable; import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FilterOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.Inpu...
renameTo(backupFile, journalFile, false); } } // Prefer to pick up where we left off. DiskLruCache cache = new DiskLruCache(directory, appVersion, valueCount, maxSize); if (cache.journalFile.exists()) { try { cache.readJournal(); cache.processJournal(); retur...
// Path: davinci/src/main/java/cn/hadcn/davinci/image/base/Util.java // public final class Util { // public static final Charset US_ASCII = Charset.forName("US-ASCII"); // public static final Charset UTF_8 = Charset.forName("UTF-8"); // // private Util() { // } // // public static String readFully...
StrictLineReader reader = new StrictLineReader(new FileInputStream(journalFile), Util.US_ASCII);
CPPAlien/DaVinci
davinci/src/main/java/cn/hadcn/davinci/volley/toolbox/AndroidAuthenticator.java
// Path: davinci/src/main/java/cn/hadcn/davinci/volley/AuthFailureError.java // @SuppressWarnings("serial") // public class AuthFailureError extends VolleyError { // /** An intent that can be used to resolve this exception. (Brings up the password dialog.) */ // private Intent mResolutionIntent; // // publ...
import android.accounts.Account; import android.accounts.AccountManager; import android.accounts.AccountManagerFuture; import android.content.Context; import android.content.Intent; import android.os.Bundle; import cn.hadcn.davinci.volley.AuthFailureError;
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
// Path: davinci/src/main/java/cn/hadcn/davinci/volley/AuthFailureError.java // @SuppressWarnings("serial") // public class AuthFailureError extends VolleyError { // /** An intent that can be used to resolve this exception. (Brings up the password dialog.) */ // private Intent mResolutionIntent; // // publ...
public String getAuthToken() throws AuthFailureError {
rmichela/GiantTrees
src/main/java/com/ryanmichela/trees/CreateTreeCommand.java
// Path: src/main/java/com/ryanmichela/trees/rendering/TreeRenderer.java // public class TreeRenderer { // // private final Plugin plugin; // // public TreeRenderer(final Plugin plugin) { // this.plugin = plugin; // } // // public void renderTree(final Location refPoint, final File treeFile, // ...
import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.plugin.Plugin; import com.ryanmichela.trees.rendering.TreeRenderer; import java.io.File; import java.util.Random; import org.bukkit...
/* * Copyright (C) 2014 Ryan Michela * Copyright (C) 2016 Ronald Jack Jenkins Jr. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) ...
// Path: src/main/java/com/ryanmichela/trees/rendering/TreeRenderer.java // public class TreeRenderer { // // private final Plugin plugin; // // public TreeRenderer(final Plugin plugin) { // this.plugin = plugin; // } // // public void renderTree(final Location refPoint, final File treeFile, // ...
private final TreeRenderer renderer;
rmichela/GiantTrees
src/arbaro/java/net/sourceforge/arbaro/tree/MeshCreator.java
// Path: src/arbaro/java/net/sourceforge/arbaro/export/Progress.java // public final class Progress { // String phase; // long maxProgress; // long progress; // // public Progress() { // maxProgress=100; // progress=0; // } // // synchronized public void beginPhase(String ph, long max) { // phase = ph; ...
import net.sourceforge.arbaro.export.Progress; import net.sourceforge.arbaro.mesh.*;
/* * This copy of Arbaro is redistributed to you under GPLv3 or (at your option) * any later version. The original copyright notice is retained below. */ // #************************************************************************** // # // # Copyright (C) 2003-2006 Wolfram Diestel // # // # This program...
// Path: src/arbaro/java/net/sourceforge/arbaro/export/Progress.java // public final class Progress { // String phase; // long maxProgress; // long progress; // // public Progress() { // maxProgress=100; // progress=0; // } // // synchronized public void beginPhase(String ph, long max) { // phase = ph; ...
Progress progress;
rmichela/GiantTrees
src/arbaro/java/net/sourceforge/arbaro/gui/ParamGroupsView.java
// Path: src/arbaro/java/net/sourceforge/arbaro/params/AbstractParam.java // public abstract class AbstractParam { // public static final int GENERAL = -999; // no level - general params // String name; // String group; // int level; // int order; // String shortDesc; // String longDesc; // boolean enabled; // ...
import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionListener; import javax.swing.tree.*; import net.sourceforge.arbaro.params.AbstractParam; import java.awt.Color; import javax.swing.JTree; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener;
} ); } public String getGroupName() throws Exception { DefaultMutableTreeNode node = (DefaultMutableTreeNode) getLastSelectedPathComponent(); if (!node.isRoot()) { return ((GroupNode)node).getGroupName(); } // no group selected throw new Exception("no group selected"); } public in...
// Path: src/arbaro/java/net/sourceforge/arbaro/params/AbstractParam.java // public abstract class AbstractParam { // public static final int GENERAL = -999; // no level - general params // String name; // String group; // int level; // int order; // String shortDesc; // String longDesc; // boolean enabled; // ...
GroupNode general = new GroupNode("","General",AbstractParam.GENERAL);
rmichela/GiantTrees
src/arbaro/java/net/sourceforge/arbaro/transformation/Vector.java
// Path: src/arbaro/java/net/sourceforge/arbaro/params/FloatFormat.java // public class FloatFormat { // // public static NumberFormat getInstance() { // NumberFormat form = NumberFormat.getNumberInstance(Locale.US); // form.setMaximumFractionDigits(5); // form.setMinimumFractionDigits(0); // return form; // ...
import net.sourceforge.arbaro.params.FloatFormat; import java.lang.String; import java.lang.Math; import java.text.NumberFormat;
/* * This copy of Arbaro is redistributed to you under GPLv3 or (at your option) * any later version. The original copyright notice is retained below. */ // #************************************************************************** // # // # Copyright (C) 2003-2006 Wolfram Diestel // # // # This program is f...
// Path: src/arbaro/java/net/sourceforge/arbaro/params/FloatFormat.java // public class FloatFormat { // // public static NumberFormat getInstance() { // NumberFormat form = NumberFormat.getNumberInstance(Locale.US); // form.setMaximumFractionDigits(5); // form.setMinimumFractionDigits(0); // return form; // ...
NumberFormat fmt = FloatFormat.getInstance();
ryantenney/passkit4j
src/main/java/com/ryantenney/passkit4j/PassResource.java
// Path: src/main/java/com/ryantenney/passkit4j/io/InputStreamSupplier.java // public interface InputStreamSupplier { // // public InputStream getInputStream() throws IOException; // // } // // Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier...
import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.concurrent.atomic.AtomicBoolean; import com.ryantenney.passkit4j.io.InputStreamSupplier; import com.ryantenney.passkit4...
package com.ryantenney.passkit4j; public class PassResource implements NamedInputStreamSupplier { private final String name;
// Path: src/main/java/com/ryantenney/passkit4j/io/InputStreamSupplier.java // public interface InputStreamSupplier { // // public InputStream getInputStream() throws IOException; // // } // // Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier...
private final InputStreamSupplier dataSupplier;
ryantenney/passkit4j
src/main/java/com/ryantenney/passkit4j/BufferedPassResource.java
// Path: src/main/java/com/ryantenney/passkit4j/io/InputStreamSupplier.java // public interface InputStreamSupplier { // // public InputStream getInputStream() throws IOException; // // }
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import com.ryantenney.passkit4j.io.InputStreamSupplier;
package com.ryantenney.passkit4j; public class BufferedPassResource extends PassResource { private static final int DEFAULT_BUFFER_SIZE = 32768; public BufferedPassResource(final String filename) throws IOException { this(new File(filename)); } public BufferedPassResource(final File file) throws IOException...
// Path: src/main/java/com/ryantenney/passkit4j/io/InputStreamSupplier.java // public interface InputStreamSupplier { // // public InputStream getInputStream() throws IOException; // // } // Path: src/main/java/com/ryantenney/passkit4j/BufferedPassResource.java import java.io.ByteArrayInputStream; import java.io.B...
public BufferedPassResource(final String name, final InputStreamSupplier dataSupplier) throws IOException {
ryantenney/passkit4j
src/main/java/com/ryantenney/passkit4j/PassSerializer.java
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestException; import java.security.DigestOutputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import ja...
package com.ryantenney.passkit4j; public class PassSerializer { public static final String PKPASS_TYPE = "application/vnd.apple.pkpass"; private static final ObjectMapper objectMapper; static { objectMapper = new ObjectMapper(); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); obje...
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
public static void writePkPassArchive(Pass pass, PassSigner signer, OutputStream out) throws PassSigningException, PassSerializationException {
ryantenney/passkit4j
src/main/java/com/ryantenney/passkit4j/PassSerializer.java
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestException; import java.security.DigestOutputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import ja...
package com.ryantenney.passkit4j; public class PassSerializer { public static final String PKPASS_TYPE = "application/vnd.apple.pkpass"; private static final ObjectMapper objectMapper; static { objectMapper = new ObjectMapper(); objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS); obje...
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
public static void writePkPassArchive(Pass pass, PassSigner signer, OutputStream out) throws PassSigningException, PassSerializationException {
ryantenney/passkit4j
src/main/java/com/ryantenney/passkit4j/PassSerializer.java
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestException; import java.security.DigestOutputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import ja...
Map<String, String> manifest = writeAndHashFiles(pass.files(), zip); manifest.put("pass.json", write(generatePass(pass), hasher(zipEntry("pass.json", zip))).hash()); byte[] manifestData = write(generateManifest(manifest), new ByteArrayOutputStream()).toByteArray(); write(manifestData, zipEntry("manifest.j...
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
PassInformation info = pass.passInformation();
ryantenney/passkit4j
src/main/java/com/ryantenney/passkit4j/PassSerializer.java
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
import java.io.ByteArrayOutputStream; import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.security.DigestException; import java.security.DigestOutputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import ja...
} catch (NoSuchProviderException e) { throw new PassSerializationException(e); } catch (IOException e) { throw new PassSerializationException(e); } finally { try { if (zip != null) zip.close(); } catch (IOException e) { throw new PassSerializationException("Error closing output stream", e); ...
// Path: src/main/java/com/ryantenney/passkit4j/io/NamedInputStreamSupplier.java // public interface NamedInputStreamSupplier extends InputStreamSupplier { // // public String getName(); // // } // // Path: src/main/java/com/ryantenney/passkit4j/model/PassInformation.java // @Data // public abstract class PassInfor...
protected static Map<String, String> writeAndHashFiles(List<NamedInputStreamSupplier> files, ZipOutputStream output) throws IOException, NoSuchAlgorithmException, DigestException, NoSuchProviderException {
copygirl/BetterStorage
src/main/java/net/mcft/copy/betterstorage/item/ItemBetterStorage.java
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
import net.mcft.copy.betterstorage.BetterStorage; import net.mcft.copy.betterstorage.misc.Constants; import net.mcft.copy.betterstorage.utils.MiscUtils; import net.mcft.copy.betterstorage.utils.StackUtils; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.item.Item; import net.minecraft.i...
package net.mcft.copy.betterstorage.item; public abstract class ItemBetterStorage extends Item { public static final String TAG_COLOR = "color"; public static final String TAG_FULL_COLOR = "fullColor"; public static final String TAG_KEYLOCK_ID = "id"; private String name; public ItemBetterStorage() { s...
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
setCreativeTab(BetterStorage.creativeTab);
copygirl/BetterStorage
src/main/java/net/mcft/copy/betterstorage/item/cardboard/ItemCardboardHoe.java
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
import net.mcft.copy.betterstorage.BetterStorage; import net.mcft.copy.betterstorage.misc.Constants; import net.mcft.copy.betterstorage.utils.MiscUtils; import net.mcft.copy.betterstorage.utils.StackUtils; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft...
package net.mcft.copy.betterstorage.item.cardboard; public class ItemCardboardHoe extends ItemHoe implements ICardboardItem { private String name; public ItemCardboardHoe() { super(ItemCardboardSheet.toolMaterial);
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
setCreativeTab(BetterStorage.creativeTab);
copygirl/BetterStorage
src/main/java/net/mcft/copy/betterstorage/tile/entity/TileEntityPresent.java
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
import net.mcft.copy.betterstorage.BetterStorage; import net.mcft.copy.betterstorage.content.BetterStorageTiles; import net.mcft.copy.betterstorage.item.tile.ItemCardboardBox; import net.mcft.copy.betterstorage.misc.SetBlockFlag; import net.mcft.copy.betterstorage.network.packet.PacketPresentOpen; import net.mcft.copy....
@Override protected void onItemDropped(ItemStack stack) { super.onItemDropped(stack); NBTTagCompound compound = stack.getTagCompound(); compound.setByte(TAG_COLOR_INNER, (byte)colorInner); compound.setByte(TAG_COLOR_OUTER, (byte)colorOuter); compound.setBoolean(TAG_SKOJANZA_MODE, skojanzaMode); if (nameTa...
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, colorInner, SetBlockFlag.SEND_TO_CLIENT);
copygirl/BetterStorage
src/main/java/net/mcft/copy/betterstorage/tile/entity/TileEntityPresent.java
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
import net.mcft.copy.betterstorage.BetterStorage; import net.mcft.copy.betterstorage.content.BetterStorageTiles; import net.mcft.copy.betterstorage.item.tile.ItemCardboardBox; import net.mcft.copy.betterstorage.misc.SetBlockFlag; import net.mcft.copy.betterstorage.network.packet.PacketPresentOpen; import net.mcft.copy....
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, colorInner, SetBlockFlag.SEND_TO_CLIENT); } @Override public boolean onBlockActivated(EntityPlayer player, int side, float hitX, float hitY, float hitZ) { ItemStack holding = player.getCurrentEquippedItem(); if (holding == null) { if (brea...
// Path: src/main/java/net/mcft/copy/betterstorage/BetterStorage.java // @Mod(modid = Constants.modId, // name = Constants.modName, // dependencies = "required-after:Forge; after:Thaumcraft; after:NotEnoughItems;", // guiFactory = "net.mcft.copy.betterstorage.client.gui.BetterStorageGuiFactory") // publi...
BetterStorage.networkChannel.sendToAllAround(
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/component/basic/BasicPanel.java
// Path: src/org/darkstorm/minecraft/gui/layout/LayoutManager.java // public interface LayoutManager { // public void reposition(Rectangle area, Rectangle[] componentAreas, // Constraint[][] constraints); // // public Dimension getOptimalPositionedSize(Rectangle[] componentAreas, // Constraint[][] constraints)...
import org.darkstorm.minecraft.gui.component.*; import org.darkstorm.minecraft.gui.layout.LayoutManager;
package org.darkstorm.minecraft.gui.component.basic; public class BasicPanel extends AbstractContainer implements Panel { public BasicPanel() { }
// Path: src/org/darkstorm/minecraft/gui/layout/LayoutManager.java // public interface LayoutManager { // public void reposition(Rectangle area, Rectangle[] componentAreas, // Constraint[][] constraints); // // public Dimension getOptimalPositionedSize(Rectangle[] componentAreas, // Constraint[][] constraints)...
public BasicPanel(LayoutManager layoutManager) {
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/component/Slider.java
// Path: src/org/darkstorm/minecraft/gui/listener/SliderListener.java // public interface SliderListener extends ComponentListener { // public void onSliderValueChanged(Slider slider); // }
import org.darkstorm.minecraft.gui.listener.SliderListener;
package org.darkstorm.minecraft.gui.component; public interface Slider extends Component, TextComponent, BoundedRangeComponent { public String getContentSuffix(); public boolean isValueChanging(); public void setContentSuffix(String suffix); public void setValueChanging(boolean changing);
// Path: src/org/darkstorm/minecraft/gui/listener/SliderListener.java // public interface SliderListener extends ComponentListener { // public void onSliderValueChanged(Slider slider); // } // Path: src/org/darkstorm/minecraft/gui/component/Slider.java import org.darkstorm.minecraft.gui.listener.SliderListener; ...
public void addSliderListener(SliderListener listener);
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/ExampleGuiManager.java
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
import org.darkstorm.minecraft.gui.component.*; import org.darkstorm.minecraft.gui.component.Button; import org.darkstorm.minecraft.gui.component.Component; import org.darkstorm.minecraft.gui.component.Frame; import org.darkstorm.minecraft.gui.component.basic.*; import org.darkstorm.minecraft.gui.listener.*; import org...
int scale = minecraft.gameSettings.guiScale; if(scale == 0) scale = 1000; int scaleFactor = 0; while(scaleFactor < scale && minecraft.displayWidth / (scaleFactor + 1) >= 320 && minecraft.displayHeight / (scaleFactor + 1) >= 240) scaleFactor++; for(Frame frame : getFrames()) { frame.setX(offsetX); ...
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
public void onButtonPress(Button button) {
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/ExampleGuiManager.java
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
import org.darkstorm.minecraft.gui.component.*; import org.darkstorm.minecraft.gui.component.Button; import org.darkstorm.minecraft.gui.component.Component; import org.darkstorm.minecraft.gui.component.Frame; import org.darkstorm.minecraft.gui.component.basic.*; import org.darkstorm.minecraft.gui.listener.*; import org...
} } private void createTestFrame() { Theme theme = getTheme(); Frame testFrame = new BasicFrame("Frame"); testFrame.setTheme(theme); testFrame.add(new BasicLabel("TEST LOL")); testFrame.add(new BasicLabel("TEST 23423")); testFrame.add(new BasicLabel("TE123123123ST LOL")); testFrame.add(new BasicLabe...
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
theme = new SimpleTheme();
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/ExampleGuiManager.java
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
import org.darkstorm.minecraft.gui.component.*; import org.darkstorm.minecraft.gui.component.Button; import org.darkstorm.minecraft.gui.component.Component; import org.darkstorm.minecraft.gui.component.Frame; import org.darkstorm.minecraft.gui.component.basic.*; import org.darkstorm.minecraft.gui.listener.*; import org...
createTestFrame(); } }); testFrame.add(new BasicCheckButton("This is a checkbox")); testFrame.add(testButton); ComboBox comboBox = new BasicComboBox("Simple theme", "Other theme", "Other theme 2"); comboBox.addComboBoxListener(new ComboBoxListener() { @Override public void onComboBoxSelectionCha...
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
slider.setValueDisplay(ValueDisplay.INTEGER);
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/ExampleGuiManager.java
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
import org.darkstorm.minecraft.gui.component.*; import org.darkstorm.minecraft.gui.component.Button; import org.darkstorm.minecraft.gui.component.Component; import org.darkstorm.minecraft.gui.component.Frame; import org.darkstorm.minecraft.gui.component.basic.*; import org.darkstorm.minecraft.gui.listener.*; import org...
testFrame.add(comboBox); Slider slider = new BasicSlider("Test"); slider.setContentSuffix("things"); slider.setValueDisplay(ValueDisplay.INTEGER); testFrame.add(slider); testFrame.add(new BasicProgressBar(50, 0, 100, 1, ValueDisplay.PERCENTAGE)); testFrame.setX(50); testFrame.setY(50); Dimension defa...
// Path: src/org/darkstorm/minecraft/gui/component/BoundedRangeComponent.java // public enum ValueDisplay { // DECIMAL, // INTEGER, // PERCENTAGE, // NONE // } // // Path: src/org/darkstorm/minecraft/gui/component/Button.java // public interface Button extends Component, TextComponent { // public void press(); //...
for(Component component : frame.getChildren()) {
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/theme/AbstractComponentUI.java
// Path: src/org/darkstorm/minecraft/gui/component/Component.java // public interface Component { // public Theme getTheme(); // // public void setTheme(Theme theme); // // public void render(); // // public void update(); // // public int getX(); // // public int getY(); // // public int getWidth(); // /...
import java.awt.*; import org.darkstorm.minecraft.gui.component.Component; import org.darkstorm.minecraft.gui.component.Container; import org.lwjgl.opengl.GL11;
package org.darkstorm.minecraft.gui.theme; public abstract class AbstractComponentUI<T extends Component> implements ComponentUI { protected final Class<T> handledComponentClass; protected Color foreground, background; public AbstractComponentUI(Class<T> handledComponentClass) { this.handledComponentClass = ha...
// Path: src/org/darkstorm/minecraft/gui/component/Component.java // public interface Component { // public Theme getTheme(); // // public void setTheme(Theme theme); // // public void render(); // // public void update(); // // public int getX(); // // public int getY(); // // public int getWidth(); // /...
public Rectangle getChildRenderArea(Container container) {
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/theme/ComponentUI.java
// Path: src/org/darkstorm/minecraft/gui/component/Component.java // public interface Component { // public Theme getTheme(); // // public void setTheme(Theme theme); // // public void render(); // // public void update(); // // public int getX(); // // public int getY(); // // public int getWidth(); // /...
import java.awt.*; import org.darkstorm.minecraft.gui.component.Component; import org.darkstorm.minecraft.gui.component.Container;
package org.darkstorm.minecraft.gui.theme; public interface ComponentUI { public void render(Component component);
// Path: src/org/darkstorm/minecraft/gui/component/Component.java // public interface Component { // public Theme getTheme(); // // public void setTheme(Theme theme); // // public void render(); // // public void update(); // // public int getX(); // // public int getY(); // // public int getWidth(); // /...
public Rectangle getChildRenderArea(Container container);
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/component/Button.java
// Path: src/org/darkstorm/minecraft/gui/listener/ButtonListener.java // public interface ButtonListener extends ComponentListener { // public void onButtonPress(Button button); // }
import org.darkstorm.minecraft.gui.listener.ButtonListener;
package org.darkstorm.minecraft.gui.component; public interface Button extends Component, TextComponent { public void press();
// Path: src/org/darkstorm/minecraft/gui/listener/ButtonListener.java // public interface ButtonListener extends ComponentListener { // public void onButtonPress(Button button); // } // Path: src/org/darkstorm/minecraft/gui/component/Button.java import org.darkstorm.minecraft.gui.listener.ButtonListener; package or...
public void addButtonListener(ButtonListener listener);
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/GuiManager.java
// Path: src/org/darkstorm/minecraft/gui/component/Frame.java // public interface Frame extends Container, DraggableComponent { // public String getTitle(); // // public void setTitle(String title); // // public boolean isPinned(); // // public void setPinned(boolean pinned); // // public boolean isPinnable();...
import org.darkstorm.minecraft.gui.component.Frame; import org.darkstorm.minecraft.gui.theme.Theme;
/* * Copyright (c) 2013, DarkStorm (darkstorm@evilminecraft.net) * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright not...
// Path: src/org/darkstorm/minecraft/gui/component/Frame.java // public interface Frame extends Container, DraggableComponent { // public String getTitle(); // // public void setTitle(String title); // // public boolean isPinned(); // // public void setPinned(boolean pinned); // // public boolean isPinnable();...
public void addFrame(Frame frame);
DarkStorm652/Minecraft-GUI-API
src/org/darkstorm/minecraft/gui/theme/simple/SimpleTheme.java
// Path: src/org/darkstorm/minecraft/gui/font/UnicodeFontRenderer.java // public class UnicodeFontRenderer extends FontRenderer { // private final UnicodeFont font; // // @SuppressWarnings("unchecked") // public UnicodeFontRenderer(Font awtFont) { // super(Minecraft.getMinecraft().gameSettings, new ResourceLocati...
import java.awt.Font; import net.minecraft.client.gui.FontRenderer; import org.darkstorm.minecraft.gui.font.UnicodeFontRenderer; import org.darkstorm.minecraft.gui.theme.AbstractTheme;
package org.darkstorm.minecraft.gui.theme.simple; public class SimpleTheme extends AbstractTheme { private final FontRenderer fontRenderer; public SimpleTheme() {
// Path: src/org/darkstorm/minecraft/gui/font/UnicodeFontRenderer.java // public class UnicodeFontRenderer extends FontRenderer { // private final UnicodeFont font; // // @SuppressWarnings("unchecked") // public UnicodeFontRenderer(Font awtFont) { // super(Minecraft.getMinecraft().gameSettings, new ResourceLocati...
fontRenderer = new UnicodeFontRenderer(new Font("Trebuchet MS", Font.PLAIN, 15));
IAmContent/public
public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange NORMAL_RANGE = range(0.0, 1.0); // // Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange REVERSE_NORMAL_RANGE = rang...
import static com.iamcontent.core.math.DoubleRange.NORMAL_RANGE; import static com.iamcontent.core.math.DoubleRange.REVERSE_NORMAL_RANGE; import static com.iamcontent.core.math.DoubleRange.range;
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange NORMAL_RANGE = range(0.0, 1.0); // // Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange REVERSE_NORMAL_RANGE = rang...
public static final InterRangeDoubleConverter REVERSE_NORMAL_CONVERTER = converterFromNormalTo(REVERSE_NORMAL_RANGE);
IAmContent/public
public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange NORMAL_RANGE = range(0.0, 1.0); // // Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange REVERSE_NORMAL_RANGE = rang...
import static com.iamcontent.core.math.DoubleRange.NORMAL_RANGE; import static com.iamcontent.core.math.DoubleRange.REVERSE_NORMAL_RANGE; import static com.iamcontent.core.math.DoubleRange.range;
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange NORMAL_RANGE = range(0.0, 1.0); // // Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange REVERSE_NORMAL_RANGE = rang...
return converterFromNormalTo(range(toLimit1, toLimit2));
IAmContent/public
public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange NORMAL_RANGE = range(0.0, 1.0); // // Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange REVERSE_NORMAL_RANGE = rang...
import static com.iamcontent.core.math.DoubleRange.NORMAL_RANGE; import static com.iamcontent.core.math.DoubleRange.REVERSE_NORMAL_RANGE; import static com.iamcontent.core.math.DoubleRange.range;
return r.clamp(d); } }, UNCLAMPED { @Override double apply(double d, DoubleRange r) { return d; } }; abstract double apply(double d, DoubleRange r); }; private final DoubleRange fromRange, toRange; private final ClampingMode clampingMode; public InterRangeDoubleConvert...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange NORMAL_RANGE = range(0.0, 1.0); // // Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/DoubleRange.java // public static final DoubleRange REVERSE_NORMAL_RANGE = rang...
return interRangeConverter(NORMAL_RANGE, toRange, DEFAULT_MODE);
IAmContent/public
public-java/devices/iamcontent-pololu-servo-controllers/src/test/java/com/iamcontent/device/controller/pololu/maestro/AbstractPololuMaestroServoCardIT.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/ThreadUtils.java // public class ThreadUtils { // // /** // * Invokes Thread.sleep(long), catching any {@link InterruptedException} that is thrown. // * @param millis The length of time to sleep in milliseconds. // * @return true if Thr...
import static org.junit.Assert.assertEquals; import org.junit.Test; import com.iamcontent.core.ThreadUtils;
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/ThreadUtils.java // public class ThreadUtils { // // /** // * Invokes Thread.sleep(long), catching any {@link InterruptedException} that is thrown. // * @param millis The length of time to sleep in milliseconds. // * @return true if Thr...
ThreadUtils.sleepUntil(() -> getPosition(channel) == position, 5000, 20);
IAmContent/public
public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/Servo.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/MutableDouble.java // public interface MutableDouble { // double getValue(); // void setValue(double v); // // /** // * Returns a proxy MutableDouble that is a two-way calibrated representation of this value. // */ // default M...
import com.iamcontent.core.math.MutableDouble; import com.iamcontent.device.io.analog.AnalogIO; import com.iamcontent.device.servo.impl.CalibratedServo;
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/MutableDouble.java // public interface MutableDouble { // double getValue(); // void setValue(double v); // // /** // * Returns a proxy MutableDouble that is a two-way calibrated representation of this value. // */ // default M...
return new CalibratedServo(this, calibration);
IAmContent/public
public-java/devices/iamcontent-pololu-servo-controllers/src/main/java/com/iamcontent/device/controller/pololu/maestro/usb/UsbPololuMaestroServoCards.java
// Path: public-java/devices/iamcontent-pololu-servo-controllers/src/main/java/com/iamcontent/device/controller/pololu/maestro/PololuMaestroServoCard.java // public interface PololuMaestroServoCard { // // interface State { // short getPosition(short channel); // } // // void setPosition(short channel, sh...
import com.iamcontent.io.usb.Usb; import java.util.function.Predicate; import javax.usb.UsbDevice; import com.iamcontent.device.controller.pololu.maestro.PololuMaestroServoCard;
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/devices/iamcontent-pololu-servo-controllers/src/main/java/com/iamcontent/device/controller/pololu/maestro/PololuMaestroServoCard.java // public interface PololuMaestroServoCard { // // interface State { // short getPosition(short channel); // } // // void setPosition(short channel, sh...
return usbPololuMaestroServoCard(Usb.device(isAMaestroUsbDevice()));
IAmContent/public
public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/impl/CalibratedServoSource.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/lang/Delegator.java // public abstract class Delegator<D> { // private final D delegate; // // public Delegator(D delegate) { // requireNonNull(delegate, "Delegate cannot be null."); // this.delegate = delegate; // } // // protecte...
import com.iamcontent.core.lang.Delegator; import com.iamcontent.device.servo.Servo; import com.iamcontent.device.servo.ServoSource; import com.iamcontent.device.servo.ServoSourceCalibration;
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/lang/Delegator.java // public abstract class Delegator<D> { // private final D delegate; // // public Delegator(D delegate) { // requireNonNull(delegate, "Delegate cannot be null."); // this.delegate = delegate; // } // // protecte...
public Servo forChannel(C channelId) {
IAmContent/public
public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/Usb.java
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbDevicePredicates.java // public static Predicate<UsbDevice> deviceHasVendorIdAndProductId(final short vendorId, final short productId) { // return new Predicate<UsbDevice>() { // public boolean test(UsbDevice device) { // retu...
import static com.iamcontent.io.usb.UsbDevicePredicates.deviceHasVendorIdAndProductId; import static com.iamcontent.io.usb.topology.UsbDeviceFinder.usbDeviceFinder; import java.util.List; import java.util.function.Predicate; import javax.usb.UsbDevice; import javax.usb.UsbHostManager; import javax.usb.UsbHub; im...
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbDevicePredicates.java // public static Predicate<UsbDevice> deviceHasVendorIdAndProductId(final short vendorId, final short productId) { // return new Predicate<UsbDevice>() { // public boolean test(UsbDevice device) { // retu...
return devices(deviceHasVendorIdAndProductId(vendorId, productId));
IAmContent/public
public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/Usb.java
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbDevicePredicates.java // public static Predicate<UsbDevice> deviceHasVendorIdAndProductId(final short vendorId, final short productId) { // return new Predicate<UsbDevice>() { // public boolean test(UsbDevice device) { // retu...
import static com.iamcontent.io.usb.UsbDevicePredicates.deviceHasVendorIdAndProductId; import static com.iamcontent.io.usb.topology.UsbDeviceFinder.usbDeviceFinder; import java.util.List; import java.util.function.Predicate; import javax.usb.UsbDevice; import javax.usb.UsbHostManager; import javax.usb.UsbHub; im...
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbDevicePredicates.java // public static Predicate<UsbDevice> deviceHasVendorIdAndProductId(final short vendorId, final short productId) { // return new Predicate<UsbDevice>() { // public boolean test(UsbDevice device) { // retu...
final UsbDeviceFinder deviceFinder = usbDeviceFinder(shouldIncludeDevice);
IAmContent/public
public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/Usb.java
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbDevicePredicates.java // public static Predicate<UsbDevice> deviceHasVendorIdAndProductId(final short vendorId, final short productId) { // return new Predicate<UsbDevice>() { // public boolean test(UsbDevice device) { // retu...
import static com.iamcontent.io.usb.UsbDevicePredicates.deviceHasVendorIdAndProductId; import static com.iamcontent.io.usb.topology.UsbDeviceFinder.usbDeviceFinder; import java.util.List; import java.util.function.Predicate; import javax.usb.UsbDevice; import javax.usb.UsbHostManager; import javax.usb.UsbHub; im...
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either vers...
// Path: public-java/io/iamcontent-usb/src/main/java/com/iamcontent/io/usb/UsbDevicePredicates.java // public static Predicate<UsbDevice> deviceHasVendorIdAndProductId(final short vendorId, final short productId) { // return new Predicate<UsbDevice>() { // public boolean test(UsbDevice device) { // retu...
final UsbDeviceFinder deviceFinder = usbDeviceFinder(shouldIncludeDevice);
IAmContent/public
public-java/robots/iamcontent-robonova-1/src/main/java/com/iamcontent/robot/robonova1/custom1/CustomRobonovaAccelerometer.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
import static com.iamcontent.core.math.InterRangeDoubleConverter.converterFromNormalTo; import static com.iamcontent.device.controller.pololu.maestro.DefaultPololuServoConfig.rawAnalogIOSource; import java.util.function.Function; import com.iamcontent.core.geom.Geometry.ThreeDimension; import com.iamcontent.device.io.a...
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 ...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
return rawAnalogIOSource()
IAmContent/public
public-java/robots/iamcontent-robonova-1/src/main/java/com/iamcontent/robot/robonova1/custom1/CustomRobonovaAccelerometer.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
import static com.iamcontent.core.math.InterRangeDoubleConverter.converterFromNormalTo; import static com.iamcontent.device.controller.pololu.maestro.DefaultPololuServoConfig.rawAnalogIOSource; import java.util.function.Function; import com.iamcontent.core.geom.Geometry.ThreeDimension; import com.iamcontent.device.io.a...
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 ...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
private static AnalogIOSourceCalibration<Integer> normalization() {
IAmContent/public
public-java/robots/iamcontent-robonova-1/src/main/java/com/iamcontent/robot/robonova1/custom1/CustomRobonovaAccelerometer.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
import static com.iamcontent.core.math.InterRangeDoubleConverter.converterFromNormalTo; import static com.iamcontent.device.controller.pololu.maestro.DefaultPololuServoConfig.rawAnalogIOSource; import java.util.function.Function; import com.iamcontent.core.geom.Geometry.ThreeDimension; import com.iamcontent.device.io.a...
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 ...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
return AnalogIOSourceCalibration.analogIOSourceCalibration(new ImmutableAnalogIOCalibration(converterFromNormalTo(0.0, 255.0))); // FIXME: Create default normalization for Poulu IO
IAmContent/public
public-java/robots/iamcontent-robonova-1/src/main/java/com/iamcontent/robot/robonova1/custom1/CustomRobonovaAccelerometer.java
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
import static com.iamcontent.core.math.InterRangeDoubleConverter.converterFromNormalTo; import static com.iamcontent.device.controller.pololu.maestro.DefaultPololuServoConfig.rawAnalogIOSource; import java.util.function.Function; import com.iamcontent.core.geom.Geometry.ThreeDimension; import com.iamcontent.device.io.a...
/** IAmContent Public Libraries. Copyright (C) 2015-2021 Greg Elderfield @author Greg Elderfield, support@jarchitect.co.uk This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 ...
// Path: public-java/iamcontent-core/src/main/java/com/iamcontent/core/math/InterRangeDoubleConverter.java // public static InterRangeDoubleConverter converterFromNormalTo(double toLimit1, double toLimit2) { // return converterFromNormalTo(range(toLimit1, toLimit2)); // } // // Path: public-java/devices/iamcontent...
return AnalogIOSourceCalibration.analogIOSourceCalibration(new ImmutableAnalogIOCalibration(converterFromNormalTo(0.0, 255.0))); // FIXME: Create default normalization for Poulu IO