Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* *********************************************************************
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0.
  * 
  * If a copy of the MPL was not distributed with this file, You can obtain
  * one at http://mozilla.org/MPL/2.0/.
  * 
  * This Source Code Form is "Incompatible With Secondary Licenses", as
  * defined by the Mozilla Public License, v. 2.0.
 * ********************************************************************* */
package fiftyone.mobile.detection.matchers;
Holds a group of Result object. Used to store the results from the different handlers.

Author(s):
51Degrees.mobi
Version:
2.2.8.9
public class Results extends ArrayList<Result> {

    
Default constructor.
    public Results() {
        super();
    }
    
    
Constructs an instance of the result class.

Parameters:
device Initial device to be added.
handler Handler to be associated with the device.
score The score associated with the result.
userAgent The target user agent.
    public Results(
            final BaseDeviceInfo device
            final Handler handler
            final long score
            final String userAgent) {
        super();
        this.add(devicehandlerscoreuserAgent);
    }

    
Adds a result to the result set.

Parameters:
device Initial device to be added.
handler Handler to be associated with the device.
score The score associated with the result.
userAgent The target user agent.
    
    public final void add(
            final BaseDeviceInfo device
            final Handler handler
            final long score
            final String userAgent) {
        super.add(new Result(
            device.getProvider(),
            device,
            handler,
            score,
            userAgent));
    }

    
Adds a range of devices to the results, all associated with the handler provided.

Parameters:
devices Array of all devices to be added.
handler Handler to be associated with the device.
score The score associated with the result.
userAgent The target user agent.
    public void addRange(
            final BaseDeviceInfo[] devices
            final Handler handler
            final long score
            final String userAgent) {
        for (BaseDeviceInfo device : devices) {
            add(devicehandlerscoreuserAgent);
        }
    }    
New to GrepCode? Check out our FAQ X