Autopsy  4.1
Graphical digital forensics platform for The Sleuth Kit and other tools.
BINRange.java
Go to the documentation of this file.
1 /*
2  * Autopsy Forensic Browser
3  *
4  * Copyright 2011-2016 Basis Technology Corp.
5  * Contact: carrier <at> sleuthkit <dot> org
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 package org.sleuthkit.autopsy.datamodel.accounts;
20 
21 import java.util.Optional;
22 import javax.annotation.concurrent.Immutable;
23 import org.apache.commons.lang3.StringUtils;
25 
29 @Immutable
30 public class BINRange implements CreditCards.BankIdentificationNumber {
31 
32  private final int BINStart; //start of BIN range, 8 digits
33  private final int BINEnd; // end (incluse ) of BIN rnage, 8 digits
34 
35  private final Integer numberLength; // the length of accounts numbers with this BIN, currently unused
36 
40  private final String scheme;
41  private final String brand;
42 
46  private final String cardType;
47  private final String country;
48  private final String bankName;
49  private final String bankCity;
50  private final String bankURL;
51  private final String bankPhoneNumber;
52 
69  public BINRange(int BIN_start, int BIN_end, Integer number_length, String scheme, String brand, String type, String country, String bank_name, String bank_url, String bank_phone, String bank_city) {
70  this.BINStart = BIN_start;
71  this.BINEnd = BIN_end;
72 
73  this.numberLength = number_length;
74  this.scheme = StringUtils.defaultIfBlank(scheme, null);
75  this.brand = StringUtils.defaultIfBlank(brand, null);
76  this.cardType = StringUtils.defaultIfBlank(type, null);
77  this.country = StringUtils.defaultIfBlank(country, null);
78  this.bankName = StringUtils.defaultIfBlank(bank_name, null);
79  this.bankURL = StringUtils.defaultIfBlank(bank_url, null);
80  this.bankPhoneNumber = StringUtils.defaultIfBlank(bank_phone, null);
81  this.bankCity = StringUtils.defaultIfBlank(bank_city, null);
82  }
83 
89  public int getBINstart() {
90  return BINStart;
91  }
92 
98  public int getBINend() {
99  return BINEnd;
100  }
101 
102  @Override
103  public Optional<Integer> getNumberLength() {
104  return Optional.ofNullable(numberLength);
105  }
106 
107  @Override
108  public Optional<String> getScheme() {
109  return Optional.ofNullable(scheme);
110  }
111 
112  @Override
113  public Optional<String> getBrand() {
114  return Optional.ofNullable(brand);
115  }
116 
117  @Override
118  public Optional<String> getCardType() {
119  return Optional.ofNullable(cardType);
120  }
121 
122  @Override
123  public Optional<String> getCountry() {
124  return Optional.ofNullable(country);
125  }
126 
127  @Override
128  public Optional<String> getBankName() {
129  return Optional.ofNullable(bankName);
130  }
131 
132  @Override
133  public Optional<String> getBankURL() {
134  return Optional.ofNullable(bankURL);
135  }
136 
137  @Override
138  public Optional<String> getBankPhoneNumber() {
139  return Optional.ofNullable(bankPhoneNumber);
140  }
141 
142  @Override
143  public Optional<String> getBankCity() {
144  return Optional.ofNullable(bankCity);
145  }
146 }
BINRange(int BIN_start, int BIN_end, Integer number_length, String scheme, String brand, String type, String country, String bank_name, String bank_url, String bank_phone, String bank_city)
Definition: BINRange.java:69

Copyright © 2012-2016 Basis Technology. Generated on: Tue Oct 25 2016
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 United States License.